bcachefs: Fix btree updates when mixing cached and non cached iterators
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 26 Oct 2020 18:45:20 +0000 (14:45 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:45 +0000 (17:08 -0400)
commit645d72aa366e51259296cfc02e37c802d7b78493
tree1dc55543dda9e52e605b45250694fd83ffa0d22f
parenteb4609796de52a8e86eb69f5cf9eabd492242a1b
bcachefs: Fix btree updates when mixing cached and non cached iterators

There was a bug where bch2_trans_update() would incorrectly delete a
pending update where the new update did not actually overwrite the
existing update, because we were incorrectly using BTREE_ITER_TYPE when
sorting pending btree updates.

This affects the pending patch to use cached iterators for inode
updates.

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_iter.c
fs/bcachefs/btree_iter.h
fs/bcachefs/btree_update_leaf.c