diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-25 18:40:15 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:19 -0400 |
commit | 4141fde0be05beb529ee6433b9808f815254901b (patch) | |
tree | dad1b32885b9ae4c9978b564e5599de1a6114256 /fs/bcachefs/journal_io.c | |
parent | e75b2d4c1c829142f8e3e64a9b3cf7faedcfb640 (diff) | |
download | lwn-4141fde0be05beb529ee6433b9808f815254901b.tar.gz lwn-4141fde0be05beb529ee6433b9808f815254901b.zip |
bcachefs: Fix bch2_journal_meta()
This patch ensures that the journal entry written gets written as flush
entry, which is important for the shutdown path - the last entry written
needs to be a flush entry.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/journal_io.c')
-rw-r--r-- | fs/bcachefs/journal_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index ae28cee127e3..bda605095825 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -1445,7 +1445,7 @@ void bch2_journal_write(struct closure *cl) SET_JSET_BIG_ENDIAN(jset, CPU_BIG_ENDIAN); SET_JSET_CSUM_TYPE(jset, bch2_meta_checksum_type(c)); - if (journal_entry_empty(jset)) + if (!JSET_NO_FLUSH(jset) && journal_entry_empty(jset)) j->last_empty_seq = le64_to_cpu(jset->seq); if (bch2_csum_type_is_encryption(JSET_CSUM_TYPE(jset))) |