aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-07-16 23:21:17 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:08 -0400
commitae2e13d7809d79ea4d7c0cd8ee060b7911012e37 (patch)
treee12ed129dcec1d25552431f3658d1f8469daa55c /fs/bcachefs/recovery.c
parentef1634f0f19d676483888c2a05d7e406b366d2db (diff)
bcachefs: bch2_run_explicit_recovery_pass()
This introduces bch2_run_explicit_recovery_pass() and uses it for when fsck detects that we need to re-run dead snaphots cleanup, and makes dead snapshot cleanup more like a normal recovery pass. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r--fs/bcachefs/recovery.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 63b385d8886a..433e7745799b 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -1270,11 +1270,8 @@ again:
c->curr_recovery_pass++;
}
- if (bch2_err_matches(ret, BCH_ERR_need_snapshot_cleanup)) {
- set_bit(BCH_FS_HAVE_DELETED_SNAPSHOTS, &c->flags);
- c->curr_recovery_pass = BCH_RECOVERY_PASS_delete_dead_snapshots;
+ if (bch2_err_matches(ret, BCH_ERR_restart_recovery))
goto again;
- }
return ret;
}