btrfs: add __btrfs_check_node helper
authorJosef Bacik <josef@toxicpanda.com>
Sat, 29 Apr 2023 20:07:16 +0000 (16:07 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:25 +0000 (13:59 +0200)
commitc26fa931eb186a748608b4155fe2f4821738b140
treefffd73cab624af7c4e543fc5ef2408bc83a12606
parent924452c80e81ba96bfc64847e983862016345381
btrfs: add __btrfs_check_node helper

This helper returns a btrfs_tree_block_status for the various errors,
and then btrfs_check_node() will return -EUCLEAN if it gets anything
other than BTRFS_TREE_BLOCK_CLEAN which will be used by the kernel.  In
the future btrfs-progs will use this helper instead.

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