nvmf: In zcopy, delay setting req->data until end of start operation
The data buffer isn't available at the beginning.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8932 (master)
(cherry picked from commit fb1ace6700
)
Change-Id: Ieeb1a297ff52dfdc6cd999d04862a0cd96483650
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8947
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
b4fec8dc03
commit
26e8bc2ea1
@ -3601,9 +3601,6 @@ spdk_nvmf_request_zcopy_start(struct spdk_nvmf_request *req)
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* backward compatible */
|
||||
req->data = req->iov[0].iov_base;
|
||||
|
||||
/* Set iovcnt to be the maximum number of
|
||||
* iovs that the ZCOPY can use
|
||||
*/
|
||||
|
@ -816,11 +816,15 @@ nvmf_bdev_ctrlr_start_zcopy_complete(struct spdk_bdev_io *bdev_io, bool success,
|
||||
spdk_bdev_io_get_iovec(bdev_io, &iov, &iovcnt);
|
||||
|
||||
assert(iovcnt <= NVMF_REQ_MAX_BUFFERS);
|
||||
assert(iovcnt > 0);
|
||||
|
||||
req->iovcnt = iovcnt;
|
||||
|
||||
assert(req->iov == iov);
|
||||
|
||||
/* backward compatible */
|
||||
req->data = req->iov[0].iov_base;
|
||||
|
||||
req->zcopy_bdev_io = bdev_io; /* Preserve the bdev_io for the end zcopy */
|
||||
|
||||
spdk_nvmf_request_complete(req);
|
||||
|
Loading…
Reference in New Issue
Block a user