summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_types.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-03-31 21:44:55 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:59 -0400
commit241e26369e1267be376490152ee2c52021b4321a (patch)
tree3959554638d2d03f6d25d8433d1964b1b3532424 /fs/bcachefs/journal_types.h
parent9d8022db1ccfff6aaf1de6158c2a26b667c70a15 (diff)
bcachefs: Don't flush btree writes more aggressively because of btree key cache
We need to flush the btree key cache when it's too dirty, because otherwise the shrinker won't be able to reclaim memory - this is done by journal reclaim. But journal reclaim also kicks btree node writes: this meant that btree node writes were getting kicked much too often just because we needed to flush btree key cache keys. This patch splits journal pins into two different lists, and teaches journal reclaim to not flush btree node writes when it only needs to flush key cache keys. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_types.h')
-rw-r--r--fs/bcachefs/journal_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/journal_types.h b/fs/bcachefs/journal_types.h
index 97d764370b89..f597eb78e66e 100644
--- a/fs/bcachefs/journal_types.h
+++ b/fs/bcachefs/journal_types.h
@@ -43,6 +43,7 @@ struct journal_buf {
struct journal_entry_pin_list {
struct list_head list;
+ struct list_head key_cache_list;
struct list_head flushed;
atomic_t count;
struct bch_devs_list devs;