bcachefs: Stash a copy of key being overwritten in btree_insert_entry
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 24 Feb 2022 16:02:58 +0000 (11:02 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:23 +0000 (17:09 -0400)
commit2e63e180665d527f52b2200acca4aeced065e63f
tree3834dc79808c33e6f42e00042799b211e5b9d648
parentce91abd60b0aa26e50e6b44b599a0e232b80a8b9
bcachefs: Stash a copy of key being overwritten in btree_insert_entry

We currently need to call bch2_btree_path_peek_slot() multiple times in
the transaction commit path - and some of those need to be updated to
also check the keys from journal replay, too. Let's consolidate this and
stash the key being overwritten in btree_insert_entry.

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