Skip to content

Commit ae153f2

Browse files
author
Kent Overstreet
committed
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 <[email protected]>
1 parent 15734b5 commit ae153f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/bcachefs/alloc_background.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1402,7 +1402,8 @@ int bch2_check_discard_freespace_key(struct btree_trans *trans, struct btree_ite
14021402

14031403
struct btree_iter alloc_iter;
14041404
struct bkey_s_c alloc_k = bch2_bkey_get_iter(trans, &alloc_iter,
1405-
BTREE_ID_alloc, bucket, BTREE_ITER_cached);
1405+
BTREE_ID_alloc, bucket,
1406+
async_repair ? BTREE_ITER_cached : 0);
14061407
int ret = bkey_err(alloc_k);
14071408
if (ret)
14081409
return ret;

0 commit comments

Comments
 (0)