[stgt] [PATCH] COMPARE_AND_WRITE: Fix this opcode so it works according to SBC

Arne Redlich arne.redlich at googlemail.com
Sat Nov 17 16:11:42 CET 2012

[Sending once more as vger bounced the previous mail - sorry for the duplicates]

2012/11/17 Ronnie Sahlberg <ronniesahlberg at gmail.com>
> After reading SBC again it becomes a lot more clear how this
> opcode works.
> Reactivate the opcode and implement it properly.
> Compare the first "number of blocks" from DATA-OUT with the existing
> content of these blocks on the LUN.
> If it compare ok, then overwrite these block on the lun with the
> next "number of blocks" from the DATA-OUT buffer.

How is atomicity guaranteed? CMIIW (it's been a while that I looked
into TGT code), but I think another backing store thread could modify
the data concurrently.

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

More information about the stgt mailing list