Skip to contentSkip to conversation

btrfs-progs: dump_tree: remove superfluous _TREE

PATCH Applied Hans van Kranenburg 3 participants 3 messages Nov 24, 2017 – Nov 27, 2017 Btrfs file system

lore
Share & tools
lore
#0 lore raw

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
index 4e72c08a..df44bb63 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Hans van Kranenburg

-# 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 +0 -0
index 4e72c08a..df44bb63 100644

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 },
Applied
#2 lore raw
Quoted 23 lines · Qu Wenruo
Quoted 14 lines · Hans van Kranenburg

-# 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 +0 -0
index 4e72c08a..df44bb63 100644

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.

Quoted 1 line

Applied, thanks.