Thread (22 messages) 22 messages, 2 authors, 2021-11-30
STALE1670d REVIEWED: 1 (0M)
Revisions (4)
  1. v1 [diff vs current]
  2. v2 current
  3. v2 [diff vs current]
  4. v3 [diff vs current]

[PATCH v2 02/20] btrfs-progs: check: don't walk down non fs-trees for qgroup check

From: Josef Bacik <josef@toxicpanda.com>
Date: 2021-11-08 19:26:55
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 check/qgroup-verify.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/check/qgroup-verify.c b/check/qgroup-verify.c
index 14645c85..a514fee1 100644
--- a/check/qgroup-verify.c
+++ b/check/qgroup-verify.c
@@ -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;
-- 
2.26.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help