btrfs-progs: check: don't walk down non fs-trees for qgroup check

We will lookup implied refs for every root id for every block that we
find when verifying qgroups, but we don't need to worry about non
fstrees, so skip them here.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Josef Bacik 2021-11-10 15:07:54 -05:00 committed by David Sterba
parent 7119dc3d79
commit 94729e9c5a

View file

@ -765,6 +765,10 @@ static int add_refs_for_implied(struct btrfs_fs_info *info, u64 bytenr,
struct btrfs_root *root;
struct btrfs_key key;
/* If this is a global tree skip it. */
if (!is_fstree(root_id))
return 0;
/* Tree reloc tree doesn't contribute qgroup, skip it */
if (root_id == BTRFS_TREE_RELOC_OBJECTID)
return 0;