Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bcachefs: Restart recovery passes more reliably

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>

+4 -1
+4 -1
fs/bcachefs/recovery.c
··· 696 696 697 697 while (c->curr_recovery_pass < ARRAY_SIZE(recovery_pass_fns)) { 698 698 if (should_run_recovery_pass(c, c->curr_recovery_pass)) { 699 + unsigned pass = c->curr_recovery_pass; 700 + 699 701 ret = bch2_run_recovery_pass(c, c->curr_recovery_pass); 700 - if (bch2_err_matches(ret, BCH_ERR_restart_recovery)) 702 + if (bch2_err_matches(ret, BCH_ERR_restart_recovery) || 703 + (ret && c->curr_recovery_pass < pass)) 701 704 continue; 702 705 if (ret) 703 706 break;