summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-09-22 08:10:30 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2024-09-24 00:46:58 +0200
commit6d12d7ace99ec74cb1f479bb851b5ed65b3bc105 (patch)
treeadc6d2b1c22ab069217fa5e890368f44e7ae6bdc /fs
parentbcachefs: Hold read lock in bch2_snapshot_tree_oldest_subvol() (diff)
downloadlinux-6d12d7ace99ec74cb1f479bb851b5ed65b3bc105.tar.xz
linux-6d12d7ace99ec74cb1f479bb851b5ed65b3bc105.zip
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)) {