From: "Theodore Ts'o" <tytso@mit.edu>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: Dave Chinner <david@fromorbit.com>,
linux-xfs@vger.kernel.org,
"Spraul Manfred (XC/QMM21-CT)" <Manfred.Spraul@de.bosch.com>
Subject: Re: Metadata CRC error detected at xfs_dir3_block_read_verify+0x9e/0xc0 [xfs], xfs_dir3_block block 0x86f58
Date: Thu, 17 Mar 2022 10:50:20 -0400 [thread overview]
Message-ID: <YjNKrGcR3++izffK@mit.edu> (raw)
In-Reply-To: <21c13283-2a9f-4978-25e4-228e44ab74e6@colorfullife.com>
On Thu, Mar 17, 2022 at 07:49:02AM +0100, Manfred Spraul wrote:
>
> > > BTRFS and ZFS can also detect torn writes, and if you use the
> > > (non-default) ext4 option "metadata_csum" it will also detect torn
> > Correction - metadata_csum is ienabled by default, I just ran the
> > wrong mkfs command when I tested it a few moments ago.
>
> For ext4, I have seen so far only corrupted commit blocks that cause mount
> failures.
>
> https://lore.kernel.org/all/8fe067d0-6d57-9dd7-2c10-5a2c34037ee1@colorfullife.com/
Ext4 uses FUA writes (if available) to write out the commit block. If
a FUA write can result in torn writes, in my opinion that's a bug with
the storage device, or if eMMC devices don't respect FUA writes
correctly, then we should just disable FUA writes entirely.
In the absence of FUA, ext4 does assume that we can write out the
commit block as a 4k write, and then issue a cache flush. If your
simulator assumes that the 4k write can be torn, on the assumption
that there is a narrow race between the issuance of the 4k write, the
device writing 1-3 512 byte sectors, and then due to a power failure,
the cache flush doesn't complete and the result is a torn write ---
quite frankly, I'm not sure how any system using checksums can deal
with that situation. I think we can only assume that that case is in
reality quite rare, even if it's technically allowed by the spec.
- Ted
next prev parent reply other threads:[~2022-03-17 14:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-13 15:47 Metadata CRC error detected at xfs_dir3_block_read_verify+0x9e/0xc0 [xfs], xfs_dir3_block block 0x86f58 Manfred Spraul
2022-03-13 22:46 ` Dave Chinner
2022-03-14 15:18 ` Manfred Spraul
2022-03-16 8:55 ` Manfred Spraul
2022-03-17 2:47 ` Dave Chinner
2022-03-17 3:08 ` Dave Chinner
2022-03-17 6:49 ` Manfred Spraul
2022-03-17 8:24 ` Dave Chinner
2022-03-17 16:09 ` Manfred Spraul
2022-03-17 14:50 ` Theodore Ts'o [this message]
2022-03-17 16:03 ` Manfred Spraul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YjNKrGcR3++izffK@mit.edu \
--to=tytso@mit.edu \
--cc=Manfred.Spraul@de.bosch.com \
--cc=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
--cc=manfred@colorfullife.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox