mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue