bcachefs: bch2_trans_revalidate_updates_in_node()
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 23 Nov 2022 23:46:03 +0000 (18:46 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:48 +0000 (17:09 -0400)
commit08f7803159f63e0ce5660acca061cbd6bac06166
treeb255029b2ac59aa9a94ec27d2dd65e37238f4173
parent321bdc73f3aaba5acb9ed7082cf222444541eb74
bcachefs: bch2_trans_revalidate_updates_in_node()

When we started stashing the key being overwritten in
btree_insert_entry, this introduced a typical iterator invalidation
problem, triggered by btree node splits or resorts.

Previously, dealt with this by unconditionally re-validating those
stashed pointers in the transaction commit path. This patch gets rid of
that by doing it only when needed, in bch2_trans_node_add() or
bch2_trans_node_reinit_iter().

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