]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: Ensure we rewind to run recovery passes
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 25 Jun 2025 04:48:14 +0000 (00:48 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 26 Jun 2025 04:01:16 +0000 (00:01 -0400)
commit64b6a788bd96a0cdc11073a2d1f85413b078c1f2
tree1a3e4388722d373fed9b8e71ce8c47b936462b22
parent3e72acb78b73ccffeaf929c039dc5a0a7a147535
bcachefs: Ensure we rewind to run recovery passes

Fix a 6.16 regression from the recovery pass rework, which introduced a
bug where calling bch2_run_explicit_recovery_pass() would only return
the error code to rewind recovery for the first call that scheduled that
recovery pass.

If the error code from the first call was swallowed (because it was
called by an asynchronous codepath), subsequent calls would go "ok, this
pass is already marked as needing to run" and return 0.

Fixing this ensures that check_topology bails out to run btree_node_scan
before doing any repair.

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