bcachefs: Restart recovery passes more reliably
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
d04d272743
commit
72e2c920e4
1 changed files with 4 additions and 1 deletions
|
@ -696,8 +696,11 @@ static int bch2_run_recovery_passes(struct bch_fs *c)
|
||||||
|
|
||||||
while (c->curr_recovery_pass < ARRAY_SIZE(recovery_pass_fns)) {
|
while (c->curr_recovery_pass < ARRAY_SIZE(recovery_pass_fns)) {
|
||||||
if (should_run_recovery_pass(c, c->curr_recovery_pass)) {
|
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);
|
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;
|
continue;
|
||||||
if (ret)
|
if (ret)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue