diff options
author | Qu Wenruo <wqu@suse.com> | 2022-12-29 07:32:23 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-01-03 15:53:18 +0100 |
commit | 77177ed17d24ba060117bdb6efb8a01da7531676 (patch) | |
tree | 81d9d36fef4a86d0eb59a6c2e20427cadd8e4923 /fs/btrfs | |
parent | 946c2923e76327343e4460e8bb7ec7b4d4589397 (diff) |
btrfs: add error message for metadata level mismatch
From a recent regression report, we found that after commit 947a629988f1
("btrfs: move tree block parentness check into
validate_extent_buffer()") if we have a level mismatch (false alert
though), there is no error message at all.
This makes later debugging harder. This patch will add the proper error
message for such case.
Link: https://lore.kernel.org/linux-btrfs/CABXGCsNzVxo4iq-tJSGm_kO1UggHXgq6CdcHDL=z5FL4njYXSQ@mail.gmail.com/
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/disk-io.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 0888d484df80..9940cc39dbc9 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -530,6 +530,9 @@ static int validate_extent_buffer(struct extent_buffer *eb, } if (found_level != check->level) { + btrfs_err(fs_info, + "level verify failed on logical %llu mirror %u wanted %u found %u", + eb->start, eb->read_mirror, check->level, found_level); ret = -EIO; goto out; } |