]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bcachefs: Ensure BCH_FS_accounting_replay_done is always set
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Sep 2024 06:10:30 +0000 (02:10 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 23 Sep 2024 22:46:58 +0000 (18:46 -0400)
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>
fs/bcachefs/recovery.c

index be1e7ca4362fd87b8ba2e2616505a0ab9b3565dc..d1699aecc9fb6072986ef636660917b43d9a0468 100644 (file)
@@ -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)) {