Commit 72ab5136 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Don't rewind to run a recovery pass we already ran



Fix a small regression from the "run recovery passes" rewrite, which
enabled async recovery passes.

This fixes getting stuck in a loop in recovery.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 686db67a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -315,7 +315,9 @@ int __bch2_run_explicit_recovery_pass(struct bch_fs *c,
		goto out;

	bool in_recovery = test_bit(BCH_FS_in_recovery, &c->flags);
	bool rewind = in_recovery && r->curr_pass > pass;
	bool rewind = in_recovery &&
		r->curr_pass > pass &&
		!(r->passes_complete & BIT_ULL(pass));
	bool ratelimit = flags & RUN_RECOVERY_PASS_ratelimit;

	if (!(in_recovery && (flags & RUN_RECOVERY_PASS_nopersistent))) {