Commit 72e2c920 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Restart recovery passes more reliably

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent d04d2727
......@@ -696,8 +696,11 @@ static int bch2_run_recovery_passes(struct bch_fs *c)
while (c->curr_recovery_pass < ARRAY_SIZE(recovery_pass_fns)) {
if (should_run_recovery_pass(c, c->curr_recovery_pass)) {
unsigned pass = c->curr_recovery_pass;
ret = bch2_run_recovery_pass(c, c->curr_recovery_pass);
if (bch2_err_matches(ret, BCH_ERR_restart_recovery))
if (bch2_err_matches(ret, BCH_ERR_restart_recovery) ||
(ret && c->curr_recovery_pass < pass))
continue;
if (ret)
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment