diff --git a/include/spdk/scsi.h b/include/spdk/scsi.h index b37f49878..a9ef38a7a 100644 --- a/include/spdk/scsi.h +++ b/include/spdk/scsi.h @@ -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; diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 1c727040b..3dc179539 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -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 */ diff --git a/lib/iscsi/task.h b/lib/iscsi/task.h index 77e7c2281..c53176563 100644 --- a/lib/iscsi/task.h +++ b/lib/iscsi/task.h @@ -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. */