summaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-08-04 03:57:06 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:10:09 +0300
commit0ed4ca146efda60057782ccda6dc056bf538cc75 (patch)
treebfef9b68303b7cc6a959bb4cb2b9b91f4837cd7a /fs/bcachefs/recovery.h
parentad52bac251589cdcd206bfec46d670ba00e6edab (diff)
downloadlinux-0ed4ca146efda60057782ccda6dc056bf538cc75.tar.xz
bcachefs: Ensure topology repair runs
This fixes should_restart_for_topology_repair() - previously it was returning false if the btree io path had already seleceted topology repair to run, even if it hadn't run yet. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.h')
-rw-r--r--fs/bcachefs/recovery.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/recovery.h b/fs/bcachefs/recovery.h
index 26cd6a230ac0..0cd6b8a13c8c 100644
--- a/fs/bcachefs/recovery.h
+++ b/fs/bcachefs/recovery.h
@@ -68,6 +68,7 @@ static inline int bch2_run_explicit_recovery_pass(struct bch_fs *c,
if (c->curr_recovery_pass >= pass) {
c->curr_recovery_pass = pass;
+ c->recovery_passes_complete &= (1ULL << pass) >> 1;
return -BCH_ERR_restart_recovery;
} else {
return 0;