Thread (104 messages) 104 messages, 13 authors, 2023-12-05

Re: [PATCH 21/21] nvme: Support atomic writes

From: Christoph Hellwig <hch@lst.de>
Date: 2023-11-10 06:29:50
Also in: linux-block, linux-fsdevel, linux-nvme, linux-xfs, lkml

On Thu, Nov 09, 2023 at 07:08:40PM +0000, John Garry wrote:
quoted
quoted
send a write that crossed the atomic write limit, but the drive wouldn't
guarantee that it was atomic except at the atomic write boundary.
Eg with an AWUN of 16kB, you could send five 16kB writes, combine them
into a single 80kB write, and if the power failed midway through, the
drive would guarantee that it had written 0, 16kB, 32kB, 48kB, 64kB or
all 80kB.  Not necessarily in order; it might have written bytes 16-32kB,
64-80kB and not the other three.
I didn't think that there are any atomic write guarantees at all if we ever 
exceed AWUN or AWUPF or cross the atomic write boundary (if any).
You're quoting a few mails before me, but I agree.
quoted
I can see some use for that, but I'm really worried that debugging
problems in the I/O merging and splitting will be absolute hell.
Even if bios were merged for NVMe the total request length still should not 
exceed AWUPF. However a check can be added to ensure this for a submitted 
atomic write request.
Yes.
As for splitting, it is not permitted for atomic writes and only a single 
bio is permitted to be created per write. Are more integrity checks 
required?
I'm more worried about the problem where we accidentally add a split.
The whole bio merge/split path is convoluted and we had plenty of
bugs in the past by not looking at all the correct flags or opcodes.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help