diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-14 07:02:36 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:51 -0400 |
commit | 53b1c6f44b1a98ea6def11b74c1fde9710f2a0b9 (patch) | |
tree | c159854a027182913261e2e4bea9aff9ae34e401 /fs/bcachefs/alloc_foreground.c | |
parent | b32f9a577b8d532d31ee7d71e58d1ec512a25a9a (diff) | |
download | linux-stable-53b1c6f44b1a98ea6def11b74c1fde9710f2a0b9.tar.gz linux-stable-53b1c6f44b1a98ea6def11b74c1fde9710f2a0b9.tar.bz2 linux-stable-53b1c6f44b1a98ea6def11b74c1fde9710f2a0b9.zip |
bcachefs: Don't use key cache during fsck
The btree key cache mainly helps with lock contention, at the cost of
additional memory overhead. During some fsck passes the memory overhead
really matters, but fsck is single threaded so lock contention is an
issue - so skipping the key cache during fsck will help with
performance.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_foreground.c')
-rw-r--r-- | fs/bcachefs/alloc_foreground.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index 5988aa288c98..a179bbe23c93 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -352,7 +352,8 @@ static struct open_bucket *try_alloc_bucket(struct btree_trans *trans, struct bc u64 bp_offset = 0; ret = bch2_get_next_backpointer(trans, POS(ca->dev_idx, b), -1, - &bp_offset, &bp); + &bp_offset, &bp, + BTREE_ITER_NOPRESERVE); if (ret) { ob = ERR_PTR(ret); goto err; |