Do real-world applications ever intentionally send more than one write
to the same disk block at the same time? It does not matter to me if
this is done using asynchronous writes from a single process
(application) on a single host, or using separate threads each of
which is doing a synchronous write, or from multiple hosts in a
distributed application on a cluster. I just want to know if the disk
can ever see this.
Of course, a buggy application could do this, so the disk firmware
cannot completely fail or crash in this case. But I'd like to know if
any (sophisticated, to be sure) applications do this on purpose
(probably for performance reasons), and therefore "disk semantics"
would dictate that if two (or more) simultaneous writes occur to the
same block, then is a subsequent read required to return *one* of the
blocks written (which one being indeterminate, of course) -- OR, is it
acceptable to return garbage or an IO error (such as checksum error)?
(I also realize that this applies on a sector (512 byte block) basis;
if two multi-block writes overlap, a later read could return a mixture
of the two writes, on a sector granularity.)
Thanks! |