Commit 8be901d5 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Always write a journal entry when stopping journal

This is to fix a (harmless) bug where the read clock hand in the
superblock doesn't match the journal.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 33114c2d
...@@ -979,9 +979,11 @@ void bch2_fs_journal_stop(struct journal *j) ...@@ -979,9 +979,11 @@ void bch2_fs_journal_stop(struct journal *j)
wait_event(j->wait, journal_entry_close(j)); wait_event(j->wait, journal_entry_close(j));
/* do we need to write another journal entry? */ /*
if (test_bit(JOURNAL_NOT_EMPTY, &j->flags)) * Always write a new journal entry, to make sure the clock hands are up
bch2_journal_meta(j); * to date (and match the superblock)
*/
bch2_journal_meta(j);
journal_quiesce(j); journal_quiesce(j);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment