iscsi-target: Fix iscsit_sequence_cmd reject handling for iser

This patch moves ISCSI_OP_REJECT failures into iscsit_sequence_cmd()
in order to avoid external iscsit_reject_cmd() reject usage for all
PDU types.

It also updates PDU specific handlers for traditional iscsi-target
code to not reset the session after posting a ISCSI_OP_REJECT during
setup.

(v2: Fix CMDSN_LOWER_THAN_EXP for ISCSI_OP_SCSI to call
     target_put_sess_cmd() after iscsit_sequence_cmd() failure)

Cc: Or Gerlitz <[email protected]>
Cc: Mike Christie <[email protected]>
Cc: [email protected]  # 3.10+
Signed-off-by: Nicholas Bellinger <[email protected]>
This commit is contained in:
Nicholas Bellinger 2013-07-03 03:58:58 -07:00
commit 561bf15892
6 changed files with 62 additions and 33 deletions

View file

@ -934,7 +934,7 @@ isert_handle_scsi_cmd(struct isert_conn *isert_conn,
}
sequence_cmd:
rc = iscsit_sequence_cmd(conn, cmd, hdr->cmdsn);
rc = iscsit_sequence_cmd(conn, cmd, buf, hdr->cmdsn);
if (!rc && dump_payload == false && unsol_data)
iscsit_set_unsoliticed_dataout(cmd);