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:
parent
04d5f47f7d
commit
46b7d49af0
@ -124,7 +124,6 @@ struct spdk_scsi_task {
|
|||||||
uint32_t alloc_len;
|
uint32_t alloc_len;
|
||||||
|
|
||||||
uint64_t offset;
|
uint64_t offset;
|
||||||
struct iovec iov;
|
|
||||||
struct spdk_scsi_task *parent;
|
struct spdk_scsi_task *parent;
|
||||||
|
|
||||||
void (*free_fn)(struct spdk_scsi_task *);
|
void (*free_fn)(struct spdk_scsi_task *);
|
||||||
@ -132,6 +131,10 @@ struct spdk_scsi_task {
|
|||||||
uint8_t *cdb;
|
uint8_t *cdb;
|
||||||
uint8_t *iobuf;
|
uint8_t *iobuf;
|
||||||
|
|
||||||
|
struct iovec iov;
|
||||||
|
struct iovec *iovs;
|
||||||
|
uint16_t iovcnt;
|
||||||
|
|
||||||
uint8_t sense_data[32];
|
uint8_t sense_data[32];
|
||||||
size_t sense_data_len;
|
size_t sense_data_len;
|
||||||
|
|
||||||
|
@ -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;
|
task->owner_task_ctr = owner_task_ctr;
|
||||||
*owner_task_ctr += 1;
|
*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) {
|
if (parent != NULL) {
|
||||||
parent->ref++;
|
parent->ref++;
|
||||||
task->parent = parent;
|
task->parent = parent;
|
||||||
|
Loading…
Reference in New Issue
Block a user