summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_key_cache.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-01-12 01:14:47 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2022-05-30 18:17:04 -0400
commit27b8e781b48eb83690dfd03c95d6d474d2ceb340 (patch)
tree69aafd413f1ee54fc40f775e42684bdb3467bfc8 /fs/bcachefs/btree_key_cache.c
parentaadb9c6f8ddbbbc9f7906b40868562b6f9620267 (diff)
bcachefs: Btree key cache coherency
Updates to non key cache iterators will now be transparently redirected to the key cache for cached btrees. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/btree_key_cache.c')
-rw-r--r--fs/bcachefs/btree_key_cache.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
index 8bfdbbdbf7c8..e6363592c417 100644
--- a/fs/bcachefs/btree_key_cache.c
+++ b/fs/bcachefs/btree_key_cache.c
@@ -414,6 +414,7 @@ static int btree_key_cache_flush_pos(struct btree_trans *trans,
* */
ret = bch2_btree_iter_traverse(&b_iter) ?:
bch2_trans_update(trans, &b_iter, ck->k,
+ BTREE_UPDATE_KEY_CACHE_RECLAIM|
BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE|
BTREE_TRIGGER_NORUN) ?:
bch2_trans_commit(trans, NULL, NULL,
@@ -555,14 +556,6 @@ bool bch2_btree_insert_key_cached(struct btree_trans *trans,
return true;
}
-#ifdef CONFIG_BCACHEFS_DEBUG
-void bch2_btree_key_cache_verify_clean(struct btree_trans *trans,
- enum btree_id id, struct bpos pos)
-{
- BUG_ON(bch2_btree_key_cache_find(trans->c, id, pos));
-}
-#endif
-
static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
struct shrink_control *sc)
{