diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-19 20:54:11 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:43 -0500 |
commit | 0c0ba8e9c5a9f06a6a57acfc34a5526f9fdd41c4 (patch) | |
tree | feead5d552f959e1dc33fe393d2d1b7b5d22d884 /fs | |
parent | 1a2a9f9f53a6c4d77bc16062fcb65c7169fb6ed1 (diff) | |
download | lwn-0c0ba8e9c5a9f06a6a57acfc34a5526f9fdd41c4.tar.gz lwn-0c0ba8e9c5a9f06a6a57acfc34a5526f9fdd41c4.zip |
bcachefs: skip journal more often in key cache reclaim
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/btree_key_cache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c index 7d2db1e5df3b..a4e9e7ffad32 100644 --- a/fs/bcachefs/btree_key_cache.c +++ b/fs/bcachefs/btree_key_cache.c @@ -655,7 +655,9 @@ static int btree_key_cache_flush_pos(struct btree_trans *trans, */ if (ck->journal.seq == journal_last_seq(j)) commit_flags |= BCH_WATERMARK_reclaim; - else + + if (ck->journal.seq != journal_last_seq(j) || + j->watermark == BCH_WATERMARK_stripe) commit_flags |= BCH_TRANS_COMMIT_no_journal_res; ret = bch2_btree_iter_traverse(&b_iter) ?: |