bcachefs: Don't persistently run scan_for_btree_nodes
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 7 Jun 2025 18:27:35 +0000 (14:27 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 12 Jun 2025 03:21:30 +0000 (23:21 -0400)
commit263561649ee5875a922f4358e96d3deb17a91021
tree08862e63f0336f97bed877fa75c6b4511072ddca
parentdd22844f48a71a414bd7e08cd4a9a5847974c07e
bcachefs: Don't persistently run scan_for_btree_nodes

bch2_btree_lost_data() gets called on btree node read error, but the
error might be transient.

btree_node_scan is expensive, and there's no need to run it persistently
(marking it in the superblock as required to run) - check_topology
will run it if required, via bch2_get_scanned_nodes().

Running it non-persistently is fine, to avoid check_topology having to
rewind recovery to run it.

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