Commit aef7eecb authored by Kent Overstreet's avatar Kent Overstreet

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: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent f7643bc9
......@@ -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;
......
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