From: Kent Overstreet Date: Tue, 26 Oct 2021 20:03:28 +0000 (-0400) Subject: bcachefs: Drop bch2_journal_meta() call when going RW X-Git-Tag: v6.7-rc1~201^2~1328 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f124345e2bed01f852a77776aaed1d106cabafbe;p=thirdparty%2Fkernel%2Flinux.git bcachefs: Drop bch2_journal_meta() call when going RW Back when we relied on the journal sequence number blacklist machinery for consistency between btree and the journal, we needed to ensure a new journal entry was written before any btree writes were done. But, this had the side effect of consuming some space in the journal prior to doing journal replay - which could lead to a very wedged filesystem, since we don't yet have a way to grow the journal prior to going RW. Fortunately, the journal sequence number blacklist machinery isn't needed anymore, as btree node pointers now record the numer of sectors currently written to that node - that code should all be ripped out. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index d17e4f005b3f1..ca2acb7c6134c 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -412,13 +412,6 @@ static int __bch2_fs_read_write(struct bch_fs *c, bool early) if (ret) goto err; - /* - * We need to write out a journal entry before we start doing btree - * updates, to ensure that on unclean shutdown new journal blacklist - * entries are created: - */ - bch2_journal_meta(&c->journal); - clear_bit(BCH_FS_ALLOC_CLEAN, &c->flags); for_each_rw_member(ca, c, i)