diff options
Diffstat (limited to 'libbcachefs/super.c')
-rw-r--r-- | libbcachefs/super.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libbcachefs/super.c b/libbcachefs/super.c index 6cbfc801..f5ee2de3 100644 --- a/libbcachefs/super.c +++ b/libbcachefs/super.c @@ -211,7 +211,14 @@ static void __bch2_fs_read_only(struct bch_fs *c) bch2_gc_thread_stop(c); - bch2_btree_flush(c); + /* + * Flush journal before stopping allocators, because flushing journal + * blacklist entries involves allocating new btree nodes: + */ + bch2_journal_flush_pins(&c->journal, U64_MAX); + + if (!bch2_journal_error(&c->journal)) + bch2_btree_verify_flushed(c); for_each_member_device(ca, c, i) bch2_dev_allocator_stop(ca); |