diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-11 00:19:05 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-22 03:14:56 +0300 |
commit | 177ac4925f4cbcfb672cb46f1d443a3d6c8a4b11 (patch) | |
tree | 090542f9f80cd33fa659385e11501107d3586527 | |
parent | 367cad09664aaf2d37e1b694eab6a14d0b5dedef (diff) | |
download | linux-177ac4925f4cbcfb672cb46f1d443a3d6c8a4b11.tar.xz |
bcachefs: Don't rewind recovery if not in recovery
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/recovery_passes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/recovery_passes.c b/fs/bcachefs/recovery_passes.c index 5f2bd8c10ce6..22cefffcf1fa 100644 --- a/fs/bcachefs/recovery_passes.c +++ b/fs/bcachefs/recovery_passes.c @@ -233,7 +233,8 @@ static int __bch2_run_explicit_recovery_pass(struct printbuf *out, c->opts.recovery_passes |= BIT_ULL(pass); - if (c->curr_recovery_pass > pass) { + if (test_bit(BCH_FS_in_recovery, &c->flags) && + c->curr_recovery_pass > pass) { c->next_recovery_pass = pass; c->recovery_passes_complete &= (1ULL << pass) >> 1; return -BCH_ERR_restart_recovery; |