bcachefs: BTREE_ITER_FILTER_SNAPSHOTS
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 5 Mar 2021 03:29:25 +0000 (22:29 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:12 +0000 (17:09 -0400)
commitc075ff700ff397671636bf45f6ef6ef330258d3e
treee4cb5a8d4b280d361156b0b0d36c016e359df5eb
parent284ae18c1d7aa44232baedf860a004ceb32fea62
bcachefs: BTREE_ITER_FILTER_SNAPSHOTS

For snapshots, we need to implement btree lookups that return the first
key that's an ancestor of the snapshot ID the lookup is being done in -
and filter out keys in unrelated snapshots. This patch adds the btree
iterator flag BTREE_ITER_FILTER_SNAPSHOTS which does that filtering.

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