bcachefs: More btree iterator fixes

- check for getting to the end of the btree in bch2_path_verify_locks
   and __btree_path_traverse_all(), this fixes an infinite loop in
   __btree_path_traverse_all().
 - relax requirement in bch2_btree_node_upgrade() that we must want an
   intent lock, this fixes bugs with paths that point to interior nodes
   (nonzero level).
 - bch2_btree_node_update_key(): fix it to upgrade the path to an intent
   lock, if necessary

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2021-10-07 14:56:56 -04:00 • committed by Kent Overstreet
commit d697b9abba
2 changed files with 24 additions and 4 deletions