Re: [PATCH 01/21] block: Add atomic write operations to request_queue limits

From: Martin K. Petersen
Date: Wed Oct 04 2023 - 14:27:22 EST



Bart,

> In my opinion there is a contradiction between the above reply and
> patch 19/21 of this series. Data written with the SCSI WRITE ATOMIC
> command is not guaranteed to survive a power failure.

That is not the intent. The intent is to ensure that for any given
application block (say 16KB), the application block on media will
contain either 100% old data or 100% new data. Always.

If a storage device offers no such guarantee across a power failure,
then it is not suitable for use by applications which do not tolerate
torn writes. That is why the writes-are-atomic-unless-there's-a-problem
variant of the values reports in NVMe are of no interest.

--
Martin K. Petersen Oracle Linux Engineering