Hi Dave,
On 3/14/22 16:18, Manfred Spraul wrote:
Hi Dave,
On 3/13/22 23:46, Dave Chinner wrote:
OK, this test is explicitly tearing writes at the storage level.
When there is an update to multiple sectors of the metadata block,
the metadata will be inconsistent on disk while those individual
sector writes are replayed.
Thanks for the clarification.
I'll modify the test application to never tear write operations and
retry.
If there are findings, then I'll distribute them.
I've modified the test app, and with 4000 simulated power failures I
have not seen any corruptions.
Thus:
- With teared write operations: 2 corruptions from ~800 simulated power
failures
- Without teared write operations: no corruptions from ~4000 simulated
power failures.
But:
I've checked the eMMC specification, and the spec allows that teared
write happen:
JESD84-B51A, chapter 6.6.8.1:
All of the sectors being modified by the write operation that was interrupted may be in one of the following states: all sectors contain new data, all sectors contain old data or some sectors contain new data and some sectors contain old data.
"some sectors contain new data and some sectors contain old data".
NVM also appears to allow tearing for writes larger than a certain size
(and the size is 2 kB in the example in the spec, and one observed
corruption happened when tearing a 20 kB write that crosses a 32kB boundary)
NVMe-NVM-Command-Set-Specification-1.0a-2021.07.26-Ratified, Chapter
2.1.4.2AWUPF/NAWUPF
If a write command is submitted with size greater than the
AWUPF/NAWUPF value or crosses an atomic
boundary, then there is no guarantee of the data returned on
subsequent reads of the associated logical
blocks.
Is my understanding correct that XFS support neither eMMC nor NVM devices?
(unless there is a battery backup that exceeds the guarantees from the spec)
--
Manfred