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 <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2018-08-23 14:11:29 +08:00 committed by David Sterba
parent ea18e30d6e
commit d980546c71

View File

@ -1420,9 +1420,8 @@ void btrfs_print_tree(struct extent_buffer *eb, int follow)
btrfs_disk_key_to_cpu(&key, &disk_key);
printf("\t");
btrfs_print_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));
fflush(stdout);
}