Skip to content

Commit 6d12d7a

Browse files
author
Kent Overstreet
committed
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>
1 parent 39c3aad commit 6d12d7a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

fs/bcachefs/recovery.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,9 @@ int bch2_fs_recovery(struct bch_fs *c)
862862

863863
clear_bit(BCH_FS_fsck_running, &c->flags);
864864

865+
/* in case we don't run journal replay, i.e. norecovery mode */
866+
set_bit(BCH_FS_accounting_replay_done, &c->flags);
867+
865868
/* fsync if we fixed errors */
866869
if (test_bit(BCH_FS_errors_fixed, &c->flags) &&
867870
bch2_write_ref_tryget(c, BCH_WRITE_REF_fsync)) {

0 commit comments

Comments
 (0)