Commit 893bf4b1 authored by Su Yue's avatar Su Yue Committed by David Sterba

btrfs: print more details when checking tree block finds a problem

For easier debugging, print eb->start if level is invalid.  Also make
clear if bytenr found is not expected.
Signed-off-by: default avatarSu Yue <suy.fnst@cn.fujitsu.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 7b4284de
...@@ -615,8 +615,8 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio, ...@@ -615,8 +615,8 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
found_start = btrfs_header_bytenr(eb); found_start = btrfs_header_bytenr(eb);
if (found_start != eb->start) { if (found_start != eb->start) {
btrfs_err_rl(fs_info, "bad tree block start %llu %llu", btrfs_err_rl(fs_info, "bad tree block start, want %llu have %llu",
found_start, eb->start); eb->start, found_start);
ret = -EIO; ret = -EIO;
goto err; goto err;
} }
...@@ -628,8 +628,8 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio, ...@@ -628,8 +628,8 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
} }
found_level = btrfs_header_level(eb); found_level = btrfs_header_level(eb);
if (found_level >= BTRFS_MAX_LEVEL) { if (found_level >= BTRFS_MAX_LEVEL) {
btrfs_err(fs_info, "bad tree block level %d", btrfs_err(fs_info, "bad tree block level %d on %llu",
(int)btrfs_header_level(eb)); (int)btrfs_header_level(eb), eb->start);
ret = -EIO; ret = -EIO;
goto err; goto err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment