btrfs-progs: print bytenr of tree block in print_tree_block_error

For easier debugging, let print_tree_block_error() print bytenr of tree
block.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Su Yue 2018-06-14 10:40:39 +08:00 committed by David Sterba
parent c722bb24f8
commit 43ec2761dc
1 changed files with 4 additions and 0 deletions

View File

@ -94,6 +94,10 @@ static void print_tree_block_error(struct btrfs_fs_info *fs_info,
char found_uuid[BTRFS_UUID_UNPARSED_SIZE] = {'\0'};
u8 buf[BTRFS_UUID_SIZE];
if (!err)
return;
fprintf(stderr, "bad tree block %llu, ", eb->start);
switch (err) {
case BTRFS_BAD_FSID:
read_extent_buffer(eb, buf, btrfs_header_fsid(),