bcachefs: Use bch2_wait_on_allocator() in btree node alloc path
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 7 Aug 2024 20:40:14 +0000 (16:40 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 8 Aug 2024 01:04:55 +0000 (21:04 -0400)
If the allocator gets stuck, we need to know why.

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

index 31ee501..e61f969 100644 (file)
@@ -1264,7 +1264,7 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,
                        ret = bch2_btree_reserve_get(trans, as, nr_nodes, flags, &cl);
 
                        bch2_trans_unlock(trans);
-                       closure_sync(&cl);
+                       bch2_wait_on_allocator(c, &cl);
                } while (bch2_err_matches(ret, BCH_ERR_operation_blocked));
        }