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

Signed-off-by: Su Yue <[email protected]>
---
 disk-io.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/disk-io.c b/disk-io.c
index 4a609a892be7..6ee65190f251 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -94,6 +94,9 @@ 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(),
-- 
2.17.1



--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to