Handle InitialR2T=Yes correctly when sendign data to a target and wait for a R2T before sending the first block of data.

We should now honour, and handle the case of
ImmediateData=No
InitialR2T=Yes
correctly for targets that are limited on receiveing data too fast.
This commit is contained in:
Ronnie Sahlberg
2011-01-02 19:31:49 +11:00
parent 74fadc9337
commit 20eaf85dd4

View File

@@ -263,8 +263,10 @@ iscsi_scsi_command_async(struct iscsi_context *iscsi, int lun,
}
}
if (pdu->nidata.size > 0) {
/* We have more data to send, so dont flag this PDU as final */
if (pdu->nidata.size > 0 && iscsi->use_initial_r2t == ISCSI_INITIAL_R2T_NO) {
/* We have more data to send, and we are allowed to send
* unsolicited data, so dont flag this PDU as final.
*/
flags &= ~ISCSI_PDU_SCSI_FINAL;
}
break;