Btrfs-progs: only print FIRST_CHUNK_TREE for chunk items in debug-tree
PATCH 1/1 Btrfs-progs: only print FIRST_CHUNK_TREE for chunk items in debug-tree
Otherwise we print FIRST_CHUNK_TREE for any objectid 256, which e.g. for the root tree is the first snap/subvol.
Signed-off-by Sage Weil <[email protected]>
--- print-tree.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
print-tree.c +5 -2
@@ -413,8 +413,11 @@ static void print_objectid(unsigned long long objectid, u8 type)printf ("MULTIPLE" );break ;case BTRFS_FIRST_CHUNK_TREE_OBJECTID : -printf ("FIRST_CHUNK_TREE" ); -break ; +if (type ==BTRFS_CHUNK_ITEM_KEY ) { +printf ("FIRST_CHUNK_TREE" ); +break ; + } +/* fall-thru */ default :printf ("%llu" , objectid); }
Signature · 1 line
1.5.6.5