projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d04d272
)
bcachefs: Restart recovery passes more reliably
author
Kent Overstreet
<kent.overstreet@linux.dev>
Fri, 5 Jan 2024 23:23:44 +0000
(18:23 -0500)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sat, 6 Jan 2024 04:24:21 +0000
(23:24 -0500)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/recovery.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/recovery.c
b/fs/bcachefs/recovery.c
index e1f0da6a717e021b894ba39932275e8b2ed0b323..725214605a050996196c28a9132f8fe247e76d28 100644
(file)
--- a/
fs/bcachefs/recovery.c
+++ b/
fs/bcachefs/recovery.c
@@
-696,8
+696,11
@@
static int bch2_run_recovery_passes(struct bch_fs *c)
while (c->curr_recovery_pass < ARRAY_SIZE(recovery_pass_fns)) {
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);
- 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;
if (ret)
break;