bcachefs: Sync journal when we complete a recovery pass
Make things easier when we're debugging long fsck runs - persist the work that successful recovery passes did. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
f7643bc974
commit
aef7eecb57
@ -222,7 +222,8 @@ int bch2_run_recovery_passes(struct bch_fs *c)
|
||||
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) ?:
|
||||
bch2_journal_flush(&c->journal);
|
||||
if (bch2_err_matches(ret, BCH_ERR_restart_recovery) ||
|
||||
(ret && c->curr_recovery_pass < pass))
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user