Add support for R2T PDUs.

Update the "send scsi command" fucntion to honour
"FirstBurstLength" so that we only send this many bytes as unsolicited data.

The wait for a train of R2T from the target to clock out additional
busrts of data until the full task data has been sent to the Target.

We should now honour, and handle the case of
ImmediateData=No
InitialR2T=No
correctly for targets that are limited on receiveing data too fast.
This commit is contained in:
Ronnie Sahlberg
2011-01-02 19:23:30 +11:00
parent 502843d64a
commit 74fadc9337
4 changed files with 48 additions and 12 deletions

View File

@@ -62,12 +62,15 @@ void write10_cb(struct iscsi_context *iscsi _U_, int status, void *command_data,
struct scsi_task *task = command_data;
if (status == SCSI_STATUS_CHECK_CONDITION) {
printf("Write10 failed with sense key:%d ascq:%04x\n", task->sense.key, task->sense.ascq);
exit(10);
}
if (status != SCSI_STATUS_GOOD) {
printf("Write10 failed with %s\n", iscsi_get_error(iscsi));
exit(10);
}
printf("Write successful\n");
printf("Write successful :%d\n", status);
exit(10);
}