Thread (28 messages) 28 messages, 5 authors, 2020-03-25

Re: [PATCH v2 10/11] iomap: Add support for zone append writes

From: Johannes Thumshirn <hidden>
Date: 2020-03-25 09:45:44
Also in: linux-fsdevel, linux-scsi

On 24/03/2020 16:41, Christoph Hellwig wrote:
quoted
+
+		/*
+		 * Issuing multiple BIOs for a large zone append write can
+		 * result in reordering of the write fragments and to data
+		 * corruption. So always stop after the first BIO is issued.
+		 */
+		if (zone_append)
+			break;
At least for a normal file system that is absolutely not true.  If
zonefs is so special it might be better of just using a slightly tweaked
copy of blkdev_direct_IO rather than using iomap.
Can you please elaborate on that? Why doesn't this hold true for a 
normal file system? If we split the DIO write into multiple BIOs with 
zone-append, there is nothing which guarantees the order of the written 
data (at least as far as I can see).

So if we have this DIO write:
|AAAAA|BBBB|CCCC|DDDD|
and we have to split it for whatever reason, what safe guards us from it 
ending up on disk like this:
|CCCC|DDDD|AAAA|BBBB|

This is essentially the same reason we can't split zone-append BIOs, or 
am I totally off track now?

Thanks,
	Johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help