nvmf: execute zcopy requests through process_io_cmd

The zcopy_start requests are now executed through
nvmf_ctrlr_process_io_cmd.  It makes the zero-copy share checks with the
regular IO path.

Note, that zcopy_end doesn't utilize this path and is directly submitted
to the bdev layer, as it doesn't need to perform these checks (they were
already verified in the accompanying zcopy_start).

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ic9ffecb15e7c351a9d60e731cc711d6500b845db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10785
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Konrad Sztyber 2021-12-06 13:48:51 +01:00 committed by Keith Lucas
parent fe1801711a
commit 24d93aa9e6

View File

@ -3873,6 +3873,10 @@ nvmf_ctrlr_process_io_cmd(struct spdk_nvmf_request *req)
req->qpair->first_fused_req = NULL;
}
if (spdk_nvmf_request_using_zcopy(req)) {
assert(req->zcopy_phase == NVMF_ZCOPY_PHASE_INIT);
return nvmf_bdev_ctrlr_start_zcopy(bdev, desc, ch, req);
} else {
switch (cmd->opc) {
case SPDK_NVME_OPC_READ:
return nvmf_bdev_ctrlr_read_cmd(bdev, desc, ch, req);
@ -3895,6 +3899,7 @@ nvmf_ctrlr_process_io_cmd(struct spdk_nvmf_request *req)
default:
return nvmf_bdev_ctrlr_nvme_passthru_io(bdev, desc, ch, req);
}
}
}
static void