]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: Kill btree_iter->journal_pos
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 17 Nov 2023 23:38:09 +0000 (18:38 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 1 Jan 2024 16:47:37 +0000 (11:47 -0500)
commitad9c7992eb9906caf17aa88f1fd41770879d1cb6
treeceea9e692991bb708ee6f41afba98752db1681c7
parent1ae8a0904a6a7b16ee2ffa30153d4e5c38719321
bcachefs: Kill btree_iter->journal_pos

For BTREE_ITER_WITH_JOURNAL, we memoize lookups in the journal keys, to
avoid the binary search overhead.

Previously we stashed the pos of the last key returned from the journal,
in order to force the lookup to be redone when rewinding.

Now bch2_journal_keys_peek_upto() handles rewinding itself when
necessary - so we can slim down btree_iter.

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