bcachefs: Kill bch2_btree_node_get_sibling()
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 29 Mar 2021 05:13:31 +0000 (01:13 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:58 +0000 (17:08 -0400)
commit54ca47e114c0cccc075a722f528de2b50b149b49
tree0e920c0ee2d944afaca186a37aeb6ae61b9d69a0
parent1259cc31b23221feae5e49cc02eaf7cfb7df9f54
bcachefs: Kill bch2_btree_node_get_sibling()

This patch reworks the btree node merge path to use a second btree
iterator to get the sibling node - which means
bch2_btree_iter_get_sibling() can be deleted. Also, it uses
bch2_btree_iter_traverse_all() if necessary - which means it should be
more reliable. We don't currently even try to make it work when
trans->nounlock is set - after a BTREE_INSERT_NOUNLOCK transaction
commit, hopefully this will be a worthwhile tradeoff.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_cache.c
fs/bcachefs/btree_cache.h
fs/bcachefs/btree_update_interior.c