btrfs: extend btrfs_leaf_check to return btrfs_tree_block_status
authorJosef Bacik <josef@toxicpanda.com>
Sat, 29 Apr 2023 20:07:15 +0000 (16:07 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:25 +0000 (13:59 +0200)
commit924452c80e81ba96bfc64847e983862016345381
tree63d7a6db5b453bbe4ce6b6b7c5e6e6aa109e7c82
parentc8d5421563547a4b4ba6fcb9dae6b323dd02b75f
btrfs: extend btrfs_leaf_check to return btrfs_tree_block_status

Instead of blanket returning -EUCLEAN for all the failures in
btrfs_check_leaf, use btrfs_tree_block_status and return the appropriate
status for each failure.  Rename the helper to __btrfs_check_leaf and
then make a wrapper of btrfs_check_leaf that will return -EUCLEAN to
non-clean error codes.  This will allow us to have the
__btrfs_check_leaf variant in btrfs-progs while keeping the behavior in
the kernel consistent.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-checker.c
fs/btrfs/tree-checker.h