From: Kent Overstreet Date: Sat, 4 Jan 2025 17:09:52 +0000 (-0500) Subject: bcachefs: Don't use BTREE_ITER_cached when walking alloc btree during fsck X-Git-Tag: io_uring-6.14-20240131~27^2~13 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=ae153f2e11eea89bc1203c33f304939190b88614;p=linux-block.git bcachefs: Don't use BTREE_ITER_cached when walking alloc btree during fsck No need to pull the whole alloc btree into the btree key cache. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index 94e7bc889cb1..fc2ef33b67b3 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -1402,7 +1402,8 @@ int bch2_check_discard_freespace_key(struct btree_trans *trans, struct btree_ite struct btree_iter alloc_iter; struct bkey_s_c alloc_k = bch2_bkey_get_iter(trans, &alloc_iter, - BTREE_ID_alloc, bucket, BTREE_ITER_cached); + BTREE_ID_alloc, bucket, + async_repair ? BTREE_ITER_cached : 0); int ret = bkey_err(alloc_k); if (ret) return ret;