]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bcachefs: btree_node_scan: Respect member.data_allowed
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 9 Apr 2024 22:50:27 +0000 (18:50 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 9 Apr 2024 22:54:46 +0000 (18:54 -0400)
If a device wasn't used for btree nodes, no need to scan for them.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_node_scan.c

index a7d0593b38714b7bcff4db6cdebd943c4376703c..556f76f5c84e1613c332e7443e6bb8b1602dd359 100644 (file)
@@ -216,6 +216,9 @@ static int read_btree_nodes(struct find_btree_nodes *f)
        closure_init_stack(&cl);
 
        for_each_online_member(c, ca) {
+               if (!(ca->mi.data_allowed & BIT(BCH_DATA_btree)))
+                       continue;
+
                struct find_btree_nodes_worker *w = kmalloc(sizeof(*w), GFP_KERNEL);
                struct task_struct *t;