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:
parent
272231686f
commit
71cbc22960
@ -3873,27 +3873,32 @@ nvmf_ctrlr_process_io_cmd(struct spdk_nvmf_request *req)
|
||||
req->qpair->first_fused_req = NULL;
|
||||
}
|
||||
|
||||
switch (cmd->opc) {
|
||||
case SPDK_NVME_OPC_READ:
|
||||
return nvmf_bdev_ctrlr_read_cmd(bdev, desc, ch, req);
|
||||
case SPDK_NVME_OPC_WRITE:
|
||||
return nvmf_bdev_ctrlr_write_cmd(bdev, desc, ch, req);
|
||||
case SPDK_NVME_OPC_COMPARE:
|
||||
return nvmf_bdev_ctrlr_compare_cmd(bdev, desc, ch, req);
|
||||
case SPDK_NVME_OPC_WRITE_ZEROES:
|
||||
return nvmf_bdev_ctrlr_write_zeroes_cmd(bdev, desc, ch, req);
|
||||
case SPDK_NVME_OPC_FLUSH:
|
||||
return nvmf_bdev_ctrlr_flush_cmd(bdev, desc, ch, req);
|
||||
case SPDK_NVME_OPC_DATASET_MANAGEMENT:
|
||||
return nvmf_bdev_ctrlr_dsm_cmd(bdev, desc, ch, req);
|
||||
case SPDK_NVME_OPC_RESERVATION_REGISTER:
|
||||
case SPDK_NVME_OPC_RESERVATION_ACQUIRE:
|
||||
case SPDK_NVME_OPC_RESERVATION_RELEASE:
|
||||
case SPDK_NVME_OPC_RESERVATION_REPORT:
|
||||
spdk_thread_send_msg(ctrlr->subsys->thread, nvmf_ns_reservation_request, req);
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_ASYNCHRONOUS;
|
||||
default:
|
||||
return nvmf_bdev_ctrlr_nvme_passthru_io(bdev, desc, ch, req);
|
||||
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);
|
||||
case SPDK_NVME_OPC_WRITE:
|
||||
return nvmf_bdev_ctrlr_write_cmd(bdev, desc, ch, req);
|
||||
case SPDK_NVME_OPC_COMPARE:
|
||||
return nvmf_bdev_ctrlr_compare_cmd(bdev, desc, ch, req);
|
||||
case SPDK_NVME_OPC_WRITE_ZEROES:
|
||||
return nvmf_bdev_ctrlr_write_zeroes_cmd(bdev, desc, ch, req);
|
||||
case SPDK_NVME_OPC_FLUSH:
|
||||
return nvmf_bdev_ctrlr_flush_cmd(bdev, desc, ch, req);
|
||||
case SPDK_NVME_OPC_DATASET_MANAGEMENT:
|
||||
return nvmf_bdev_ctrlr_dsm_cmd(bdev, desc, ch, req);
|
||||
case SPDK_NVME_OPC_RESERVATION_REGISTER:
|
||||
case SPDK_NVME_OPC_RESERVATION_ACQUIRE:
|
||||
case SPDK_NVME_OPC_RESERVATION_RELEASE:
|
||||
case SPDK_NVME_OPC_RESERVATION_REPORT:
|
||||
spdk_thread_send_msg(ctrlr->subsys->thread, nvmf_ns_reservation_request, req);
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_ASYNCHRONOUS;
|
||||
default:
|
||||
return nvmf_bdev_ctrlr_nvme_passthru_io(bdev, desc, ch, req);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user