bcachefs: Only run 'increase_depth' for keys from btree node csan
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 7 Jun 2025 16:56:33 +0000 (12:56 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 12 Jun 2025 03:21:30 +0000 (23:21 -0400)
commitb47a82ff4772ea9d7091b85ef5f34dc78c866a02
tree34eba1ccaeed900cff35ea40cf65bce24477f734
parent7b0e6b198e4ef39ec89285d953778c5a3a04d390
bcachefs: Only run 'increase_depth' for keys from btree node csan

bch2_btree_increase_depth() was originally for disaster recovery, to get
some data back from the journal when a btree root was bad.

We don't need it for that purpose anymore; on bad btree root we'll
launch btree node scan and reconstruct all the interior nodes.

If there's a key in the journal for a depth that doesn't exists, and
it's not from check_topology/btree node scan, we should just ignore it.

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