diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-11 19:21:16 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:04 -0400 |
commit | 7724664f0ee4520f1c7fd3c0cc26223ba532986f (patch) | |
tree | 574cb11a00c27ccd17dab276b08e6b1d02c90709 | |
parent | 99a3d39893615ac107a4f82e86d4c26792131b91 (diff) | |
download | lwn-7724664f0ee4520f1c7fd3c0cc26223ba532986f.tar.gz lwn-7724664f0ee4520f1c7fd3c0cc26223ba532986f.zip |
bcachefs: New assertions when marking filesystem clean
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/super.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index 8f0cbd7ada82..9f1cca7d6c8e 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -302,6 +302,11 @@ void bch2_fs_read_only(struct bch_fs *c) test_bit(BCH_FS_STARTED, &c->flags) && test_bit(BCH_FS_CLEAN_SHUTDOWN, &c->flags) && !c->opts.norecovery) { + BUG_ON(c->journal.last_empty_seq != journal_cur_seq(&c->journal)); + BUG_ON(atomic_read(&c->btree_cache.dirty)); + BUG_ON(atomic_long_read(&c->btree_key_cache.nr_dirty)); + BUG_ON(c->btree_write_buffer.state.nr); + bch_verbose(c, "marking filesystem clean"); bch2_fs_mark_clean(c); } |