]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: improve error reporting in lookup_inline_extent_backref
authorNikolay Borisov <nborisov@suse.com>
Fri, 29 Apr 2022 14:17:34 +0000 (17:17 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:17:32 +0000 (17:17 +0200)
commit4b2a7e9213ed7f7dd2d654f7483191d3df76f219
treee85a40427344423db7ffbb1def66bfd6d3bdc022
parent4aca4d527c2813e22da6493a3302328f46f96c7a
btrfs: improve error reporting in lookup_inline_extent_backref

When iterating the backrefs in an extent item if the ptr to the
'current' backref record goes beyond the extent item a warning is
generated and -ENOENT is returned. However what's more appropriate to
debug such cases would be to return EUCLEAN and also print identifying
information about the performed search as well as the current content of
the leaf containing the possibly corrupted extent item.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c