diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-07 07:15:12 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:23 +0300 |
commit | f7b6ca23b6456b8b441b506ef977ff53972b35c2 (patch) | |
tree | 89612a8307e8f5d5728af221c26f7d79511341f8 /fs/bcachefs/btree_iter.h | |
parent | 45e4cd9e3a088d476929c5ee245e83baeee6cdd5 (diff) | |
download | linux-f7b6ca23b6456b8b441b506ef977ff53972b35c2.tar.xz |
bcachefs: BTREE_ITER_WITH_KEY_CACHE
This is the start of cache coherency with the btree key cache - this
adds a btree iterator flag that causes lookups to also check the key
cache when we're iterating over the btree (not iterating over the key
cache).
Note that we could still race with another thread creating at item in
the key cache and updating it, since we aren't holding the key cache
locked if it wasn't found. The next patch for the update path will
address this by causing the transaction to restart if the key cache is
found to be dirty.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_iter.h')
-rw-r--r-- | fs/bcachefs/btree_iter.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h index 3f8aaccc5208..1e3172a2885a 100644 --- a/fs/bcachefs/btree_iter.h +++ b/fs/bcachefs/btree_iter.h @@ -50,11 +50,6 @@ static inline struct btree *btree_node_parent(struct btree_path *path, return btree_path_node(path, b->c.level + 1); } -static inline int btree_iter_err(const struct btree_iter *iter) -{ - return iter->flags & BTREE_ITER_ERROR ? -EIO : 0; -} - /* Iterate over paths within a transaction: */ void __bch2_btree_trans_sort_paths(struct btree_trans *); |