btrfs-progs: dump_tree: remove superfluous _TREE
PATCH 1/1 btrfs-progs: dump_tree: remove superfluous _TREE
-# btrfs inspect-internal dump-tree -t fs /dev/block/device
ERROR: unrecognized tree id: fs
Without this fix I can't dump-tree fs, but I can dump-tree fs_tree and also fs_tree_tree, which is a bit silly.
--- cmds-inspect-dump-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
cmds-inspect-dump-tree.c +1 -1
@@ -143,7 +143,7 @@ static u64 treeid_from_string(const char *str, const char **end) { "CHUNK", BTRFS_CHUNK_TREE_OBJECTID }, { "DEVICE", BTRFS_DEV_TREE_OBJECTID }, { "DEV", BTRFS_DEV_TREE_OBJECTID }, - { "FS_TREE", BTRFS_FS_TREE_OBJECTID }, + { "FS", BTRFS_FS_TREE_OBJECTID }, { "CSUM", BTRFS_CSUM_TREE_OBJECTID }, { "CHECKSUM", BTRFS_CSUM_TREE_OBJECTID }, { "QUOTA", BTRFS_QUOTA_TREE_OBJECTID },
Signature · 1 line
2.11.0
Quoted 14 lines · Hans van Kranenburg
-# btrfs inspect-internal dump-tree -t fs
/dev/block/device
ERROR: unrecognized tree id: fsWithout this fix I can't dump-tree fs, but I can dump-tree
fs_treeand alsofs_tree_tree, which is a bit silly.--- cmds-inspect-dump-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmds-inspect-dump-tree.c +0
-0
cmds-inspect-dump-tree.c static u64 treeid_from_string(const char *str, const char **end) · line 146
Quoted 5 lines
cmds-inspect-dump-tree.c +1
-1@@ -143,7 +143,7 @@ static u64 treeid_from_string(const char *str, const char **end) { "CHUNK", BTRFS_CHUNK_TREE_OBJECTID }, { "DEVICE", BTRFS_DEV_TREE_OBJECTID }, { "DEV", BTRFS_DEV_TREE_OBJECTID }, - { "FS_TREE", BTRFS_FS_TREE_OBJECTID }, + { "FS", BTRFS_FS_TREE_OBJECTID },
Considering no other name has the _tree suffix, this looks good to me.
Thanks,
Qu
Quoted 4 lines
cmds-inspect-dump-tree.c +0
-0{ "CSUM", BTRFS_CSUM_TREE_OBJECTID }, { "CHECKSUM", BTRFS_CSUM_TREE_OBJECTID }, { "QUOTA", BTRFS_QUOTA_TREE_OBJECTID },
David Sterba
AppliedQuoted 23 lines · Qu Wenruo
Quoted 14 lines · Hans van Kranenburg
-# btrfs inspect-internal dump-tree -t fs
/dev/block/device
ERROR: unrecognized tree id: fsWithout this fix I can't dump-tree fs, but I can dump-tree
fs_treeand alsofs_tree_tree, which is a bit silly.--- cmds-inspect-dump-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmds-inspect-dump-tree.c +0
-0cmds-inspect-dump-tree.c static u64 treeid_from_string(const char *str, const char **end) · line 146
Quoted 5 lines
cmds-inspect-dump-tree.c +1
-1@@ -143,7 +143,7 @@ static u64 treeid_from_string(const char *str, const char **end) { "CHUNK", BTRFS_CHUNK_TREE_OBJECTID }, { "DEVICE", BTRFS_DEV_TREE_OBJECTID }, { "DEV", BTRFS_DEV_TREE_OBJECTID }, - { "FS_TREE", BTRFS_FS_TREE_OBJECTID }, + { "FS", BTRFS_FS_TREE_OBJECTID },Considering no other name has the
_treesuffix, this looks good to me.
Quoted 1 line
Reviewed-by Qu Wenruo <[email protected]>
Applied, thanks.