scsi: move desired_data_transfer_length to iSCSI task

Change-Id: I425f9cc7c572b4d819d0aae370f7a96c57d6eac1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2017-05-03 13:41:51 -07:00
parent 414b754579
commit d4da788057
3 changed files with 4 additions and 3 deletions

View File

@ -110,7 +110,6 @@ struct spdk_scsi_task {
uint32_t transfer_len;
uint32_t data_out_cnt;
uint32_t dxfer_dir;
uint32_t desired_data_transfer_length;
/* Only valid for Read/Write */
uint32_t bytes_completed;
uint32_t length;

View File

@ -4063,7 +4063,7 @@ static int spdk_iscsi_op_data(struct spdk_iscsi_conn *conn,
goto reject_return;
}
if (pdu->data_segment_len > task->scsi.desired_data_transfer_length) {
if (pdu->data_segment_len > task->desired_data_transfer_length) {
SPDK_ERRLOG("the dataout pdu data length is larger than the value sent by R2T PDU");
return SPDK_ISCSI_CONNECTION_FATAL;
}
@ -4181,7 +4181,7 @@ spdk_iscsi_send_r2t(struct spdk_iscsi_conn *conn,
to_be32(&rsph->buffer_offset, (uint32_t)offset);
to_be32(&rsph->desired_xfer_len, (uint32_t)len);
task->scsi.desired_data_transfer_length = (size_t)len;
task->desired_data_transfer_length = (size_t)len;
/* we need to hold onto this task/cmd because until the PDU has been
* written out */

View File

@ -44,6 +44,8 @@ struct spdk_iscsi_task {
struct spdk_iscsi_pdu *pdu;
uint32_t outstanding_r2t;
uint32_t desired_data_transfer_length;
/*
* Tracks the current offset of large read io.
*/