spdk: remove iobuf from spdk_scsi_task

This patch removes reduntant field in spdk_scsi_task and
fixes all logic to use iov.iov_base

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Ie2fa1e2357b6383c118d05aec9206d1c60537d40
This commit is contained in:
Piotr Pelplinski 2016-10-12 14:22:45 +02:00 committed by Daniel Verkamp
parent 78a018260d
commit 074b6d2430
4 changed files with 4 additions and 6 deletions

View File

@ -129,7 +129,6 @@ struct spdk_scsi_task {
void (*free_fn)(struct spdk_scsi_task *);
uint8_t *cdb;
uint8_t *iobuf;
struct iovec iov;
struct iovec *iovs;

View File

@ -2993,9 +2993,8 @@ spdk_iscsi_op_scsi(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
if (pdu->data_segment_len == transfer_len) {
/* we are doing small writes with no R2T */
task->scsi.iobuf = pdu->data;
task->scsi.iov.iov_len = transfer_len;
task->scsi.iov.iov_base = task->scsi.iobuf;
task->scsi.iov.iov_base = pdu->data;
task->scsi.length = transfer_len;
}
} else {

View File

@ -1680,7 +1680,7 @@ spdk_bdev_scsi_process_primary(struct spdk_bdev *bdev,
case SPDK_SPC_MODE_SELECT_6:
case SPDK_SPC_MODE_SELECT_10:
data = task->iobuf;
data = task->iov.iov_base;
if (cdb[0] == SPDK_SPC_MODE_SELECT_6) {
md = 4;

View File

@ -190,7 +190,7 @@ mode_select_6_test(void)
memset(data, 0, sizeof(data));
data[4] = 0x08;
data[5] = 0x02;
task.iobuf = data;
task.iov.iov_base = data;
rc = spdk_bdev_scsi_execute(&bdev, &task);
@ -223,7 +223,7 @@ mode_select_6_test2(void)
lun.dev = &dev;
task.lun = &lun;
task.iobuf = NULL;
task.iov.iov_base = NULL;
rc = spdk_bdev_scsi_execute(&bdev, &task);