From: <ag...@us...> - 2013-04-01 19:44:31
|
Revision: 490 http://iscsitarget.svn.sourceforge.net/iscsitarget/?rev=490&view=rev Author: agr1 Date: 2013-04-01 19:44:23 +0000 (Mon, 01 Apr 2013) Log Message: ----------- Handle register request reservation conflict correctly >From Lee Duncan <ld...@su...>: The SCSI Spec says that a group reservation registration request received from a registered I_T Nexus with the incorrect reservation key should return a reservation conflict. Signed-off-by: Lee Duncan <ld...@su...> Modified Paths: -------------- trunk/kernel/persist.c Modified: trunk/kernel/persist.c =================================================================== --- trunk/kernel/persist.c 2012-11-01 19:43:43 UTC (rev 489) +++ trunk/kernel/persist.c 2013-04-01 19:44:23 UTC (rev 490) @@ -346,10 +346,13 @@ continue; if (!ignore && param->reservation_key != reg->reservation_key) { - iscsi_cmnd_set_sense(cmnd, - ILLEGAL_REQUEST, - INVALID_COMMAND_OPERATION_CODE_ASC, - INVALID_COMMAND_OPERATION_CODE_ASCQ); + /* + * SPC4r33: Table 49: when REGISTER is received on a + * registered I_T nexus with a reservation key not + * equal to the existing reservation key, we should + * return RESERVATION CONFLICT + */ + cmnd->status = SAM_STAT_RESERVATION_CONFLICT; goto out; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |