path: root/print-tree.c
diff options
authorQu Wenruo <>2018-08-23 14:11:29 +0800
committerDavid Sterba <>2018-10-23 14:48:39 +0200
commitd980546c715cfe4e5fbadbabb68e9e5d150272be (patch)
tree6688b453ba5746ede34f9257fa4665d8f5fd9755 /print-tree.c
parentea18e30d6e4674f7b0c416c8311792d668149455 (diff)
btrfs-progs: print-tree: skip deprecated blockptr / nodesize output
When printing tree nodes, we output slots like: key (EXTENT_TREE ROOT_ITEM 0) block 73625600 (17975) gen 16 The number in the parentheses is blockptr / nodesize. However this number doesn't really do anything useful. And in fact for unaligned metadata block group (block group start bytenr is not aligned to 16K), the number doesn't even make sense as it's rounded down. In fact kernel doesn't ever output such divided result in its print-tree.c Remove it so later reader won't wonder what the number means. Signed-off-by: Qu Wenruo <> Reviewed-by: Nikolay Borisov <> Signed-off-by: David Sterba <>
Diffstat (limited to 'print-tree.c')
1 files changed, 1 insertions, 2 deletions
diff --git a/print-tree.c b/print-tree.c
index a09ecfbb..31f6fa12 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -1420,9 +1420,8 @@ void btrfs_print_tree(struct extent_buffer *eb, int follow)
btrfs_disk_key_to_cpu(&key, &disk_key);
- printf(" block %llu (%llu) gen %llu\n",
+ printf(" block %llu gen %llu\n",
(unsigned long long)blocknr,
- (unsigned long long)blocknr / eb->len,
(unsigned long long)btrfs_node_ptr_generation(eb, i));