> -----Original Message-----
> From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi-
> ow...@vger.kernel.org] On Behalf Of Douglas Gilbert
> Sent: Thursday, 16 October, 2014 3:02 PM
...
> On 14-10-16 12:39 PM, Douglas Gilbert wrote:
...
> > The COMPARE AND WRITE command may fail for other reasons
> > such as a transport problem or a Unit Attention, so the
> > SCSI eh logic may need to know about it.
> 
> Elaborating ...
> 
> Hannes will enjoy this one: say a COMPARE AND WRITE (CAW) fails
> due to a transport error or timeout. What should the EH do *** ?
> Answer: read that LBA(s) to see whether the command succeeded
> (i.e. wrote the new data)! If it did, do nothing; if it didn't,
> repeat the CAW command. And naturally that second CAW may
> yield a MISCOMPARE.

I don't think that is safe.. detecting the write data is in
place doesn't prove the COMPARE AND WRITE really worked as
a whole.

Example: if two applications do this:
* application 1: COMPARE AND WRITE: change 4 to 6
* application 2: COMPARE AND WRITE: change 5 to 6

and they both run into transport errors, then they'll 
both read back 6 and think their commands worked when
really only one of them worked.

---
Rob Elliott    HP Server Storage



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to