bcachefs: Handle last journal write being torn
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 20 Nov 2022 02:40:35 +0000 (21:40 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:46 +0000 (17:09 -0400)
commitdab1e24867f0e694c8ab73c075d10676c2699d85
tree294189f306bcc4db6955f73b6c2de03968a23bac
parentff56d68cf9ea04504be94eb7a476efcb92028a42
bcachefs: Handle last journal write being torn

If the last journal write didn't complete sucessfully due to a torn
write, we'll detect it as a checksum error. In that case, we should just
pretend that journal entry was never written.

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