diff options
author | Su Yue <suy.fnst@cn.fujitsu.com> | 2018-06-14 10:40:39 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 15:01:29 +0200 |
commit | 43ec2761dca211dfd18d5b26afdd7c07036539fe (patch) | |
tree | c170698bf5cbd9ba89cbcd7bfa7db1bc32d06fff | |
parent | c722bb24f84c5643c110c877d710626c60690be1 (diff) |
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>
-rw-r--r-- | disk-io.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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(), |