From: Kent Overstreet Date: Sun, 22 Sep 2024 06:10:30 +0000 (-0400) Subject: bcachefs: Ensure BCH_FS_accounting_replay_done is always set X-Git-Tag: v6.12-rc1~6^2~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d12d7ace99ec74cb1f479bb851b5ed65b3bc105;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index be1e7ca4362fd..d1699aecc9fb6 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)) {