diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-06-13 17:07:18 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2021-09-26 17:04:09 -0400 |
commit | 9bca831413b5b311f49d3ac73f5091d72ab09331 (patch) | |
tree | f9d2bb266e2d05639039dca969e8551183e548a9 | |
parent | 19baf6d15ca1506fad26fccece18e89e03811772 (diff) |
bcachefs: Disable btree key cache for inodes
Snapshots breaks using the btree key cache for inodes, for now: filling
in a key cache entry does a btree lookup in FILTER_SNAPSHOTS mode, which
means cached inodes at different positions (ancestor snapshots) need to
be flushed for the FILTER_SNAPHSOTS lookup to work correctly - and we
currently don't have a good way of doing that flush.
Thus, this workaround for now.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | fs/bcachefs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c index 14b0e8c03119..84643eaaa8d5 100644 --- a/fs/bcachefs/inode.c +++ b/fs/bcachefs/inode.c @@ -300,7 +300,7 @@ int bch2_inode_peek(struct btree_trans *trans, struct bkey_s_c k; int ret; - if (trans->c->opts.inodes_use_key_cache) + if (0 && trans->c->opts.inodes_use_key_cache) flags |= BTREE_ITER_CACHED; bch2_trans_iter_init(trans, iter, BTREE_ID_inodes, POS(0, inum), flags); @@ -593,7 +593,7 @@ int bch2_inode_rm(struct bch_fs *c, u64 inode_nr, bool cached) unsigned iter_flags = BTREE_ITER_INTENT; int ret; - if (cached && c->opts.inodes_use_key_cache) + if (0 && cached && c->opts.inodes_use_key_cache) iter_flags |= BTREE_ITER_CACHED; bch2_trans_init(&trans, c, 0, 1024); |