spdk: add iov buffers to struct spdk_scsi_task

Preparation for SGL support (readv/writev).

Change-Id: I14a116d764ebc582ea0a0077cc5a0d0bac638cb0
Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
This commit is contained in:
Krzysztof Jakimiak 2016-10-04 17:10:35 +02:00 committed by Jim Harris
parent 04d5f47f7d
commit 46b7d49af0
2 changed files with 10 additions and 1 deletions

View File

@ -124,7 +124,6 @@ struct spdk_scsi_task {
uint32_t alloc_len;
uint64_t offset;
struct iovec iov;
struct spdk_scsi_task *parent;
void (*free_fn)(struct spdk_scsi_task *);
@ -132,6 +131,10 @@ struct spdk_scsi_task {
uint8_t *cdb;
uint8_t *iobuf;
struct iovec iov;
struct iovec *iovs;
uint16_t iovcnt;
uint8_t sense_data[32];
size_t sense_data_len;

View File

@ -88,6 +88,12 @@ spdk_scsi_task_construct(struct spdk_scsi_task *task, uint32_t *owner_task_ctr,
task->owner_task_ctr = owner_task_ctr;
*owner_task_ctr += 1;
/*
* Pre-fill the iov_buffers to point to the embedded iov
*/
task->iovs = &task->iov;
task->iovcnt = 1;
if (parent != NULL) {
parent->ref++;
task->parent = parent;