]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bcachefs: Run jset_validate in write path as well
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 14 Jan 2021 21:21:22 +0000 (16:21 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:51 +0000 (17:08 -0400)
commited9d58a2b1ddbc38816571638ee114b7efb9f279
tree45ac754bb0a0abad856d100e891f3c9f8bf18f78
parentac958006294ab462848bc69b9b5ddb1a8b99e748
bcachefs: Run jset_validate in write path as well

This is because we had a bug where we were writing out journal entries
with garbage last_seq, and not catching it.

Also, completely ignore jset->last_seq when JSET_NO_FLUSH is true,
because of aforementioned bug, but change the write path to set last_seq
to 0 when JSET_NO_FLUSH is true.

Minor other cleanups and comments.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_io.c
fs/bcachefs/journal.c
fs/bcachefs/journal_io.c