summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-09-22 02:10:30 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-09-23 18:46:58 -0400
commit6d12d7ace99ec74cb1f479bb851b5ed65b3bc105 (patch)
treeadc6d2b1c22ab069217fa5e890368f44e7ae6bdc /fs
parent39c3aad43f6f9bcddd660f5874dcd760e8c04a94 (diff)
bcachefs: Ensure BCH_FS_accounting_replay_done is always set
if it doesn't get set we'll never be able to flush the btree write buffer; this only happens in fake rw mode, but prevents us from shutting down. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/recovery.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index be1e7ca4362f..d1699aecc9fb 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -862,6 +862,9 @@ use_clean:
clear_bit(BCH_FS_fsck_running, &c->flags);
+ /* in case we don't run journal replay, i.e. norecovery mode */
+ set_bit(BCH_FS_accounting_replay_done, &c->flags);
+
/* fsync if we fixed errors */
if (test_bit(BCH_FS_errors_fixed, &c->flags) &&
bch2_write_ref_tryget(c, BCH_WRITE_REF_fsync)) {