@@ -169,12 +169,19 @@ static u64 treeid_from_string(const char *str, const char **end)
{ "QUOTA", BTRFS_QUOTA_TREE_OBJECTID },
{ "UUID", BTRFS_UUID_TREE_OBJECTID },
{ "FREE_SPACE", BTRFS_FREE_SPACE_TREE_OBJECTID },
+ { "FREE-SPACE", BTRFS_FREE_SPACE_TREE_OBJECTID },
{ "TREE_LOG_FIXUP", BTRFS_TREE_LOG_FIXUP_OBJECTID },
+ { "TREE-LOG-FIXUP", BTRFS_TREE_LOG_FIXUP_OBJECTID },
{ "TREE_LOG", BTRFS_TREE_LOG_OBJECTID },
+ { "TREE-LOG", BTRFS_TREE_LOG_OBJECTID },
{ "TREE_RELOC", BTRFS_TREE_RELOC_OBJECTID },
+ { "TREE-RELOC", BTRFS_TREE_RELOC_OBJECTID },
{ "DATA_RELOC", BTRFS_DATA_RELOC_TREE_OBJECTID },
+ { "DATA-RELOC", BTRFS_DATA_RELOC_TREE_OBJECTID },
{ "BLOCK_GROUP", BTRFS_BLOCK_GROUP_TREE_OBJECTID },
+ { "BLOCK-GROUP", BTRFS_BLOCK_GROUP_TREE_OBJECTID },
{ "RAID_STRIPE", BTRFS_RAID_STRIPE_TREE_OBJECTID },
+ { "RAID-STRIPE", BTRFS_RAID_STRIPE_TREE_OBJECTID },
};
if (strncasecmp("BTRFS_", str, strlen("BTRFS_")) == 0)
Currently for multi-word tree names, we only allow '_' to connect the two words, like "block_group". Meanwhile for mkfs features, we go '-' to connect two words, like "block-group-tree". This makes users to use different separators for different commands. This patch would allow using both '-' and '_' for tree ids. Signed-off-by: Qu Wenruo <wqu@suse.com> --- cmds/inspect-dump-tree.c | 7 +++++++ 1 file changed, 7 insertions(+)