bcachefs: Key cache now works for snapshots btrees
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 23 Nov 2022 01:15:33 +0000 (20:15 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:47 +0000 (17:09 -0400)
commit1617d56dc9bc3d9fd56824e8e488e88acbba152f
tree842d081d2ef876baca5cde97d7f12bd8ea77cc99
parent087e53c255b6fe8ec6b573acbdf12a555aae493b
bcachefs: Key cache now works for snapshots btrees

This switches btree_key_cache_fill() to use a btree iterator, not a
btree path, so that it can search for keys in previous snapshots.

We also add another iterator flag, BTREE_ITER_KEY_CACHE_FILL, to avoid
recursion back into the key cache.

This will allow us to re-enable the key cache for inodes in the next
patch.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_key_cache.c
fs/bcachefs/btree_types.h
fs/bcachefs/inode.c