nvmf: make fused status construction easier to understand
It is a bit confusing for the variable names to not match the parameter names for spdk_bdev_io_get_nvme_fused_status(). These changes should make it a bit simpler to understand. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I833bf2a75cfec7b86da2d8a234f800de3510c2b7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9867 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
d58d7e3c47
commit
67ac0638eb
@ -93,29 +93,29 @@ nvmf_bdev_ctrlr_complete_cmd(struct spdk_bdev_io *bdev_io, bool success,
|
||||
{
|
||||
struct spdk_nvmf_request *req = cb_arg;
|
||||
struct spdk_nvme_cpl *response = &req->rsp->nvme_cpl;
|
||||
int first_sc = 0, first_sct = 0, second_sc = 0, second_sct = 0;
|
||||
int first_sc = 0, first_sct = 0, sc = 0, sct = 0;
|
||||
uint32_t cdw0 = 0;
|
||||
struct spdk_nvmf_request *first_req = req->first_fused_req;
|
||||
|
||||
if (spdk_unlikely(first_req != NULL)) {
|
||||
/* fused commands - get status for both operations */
|
||||
struct spdk_nvme_cpl *fused_response = &first_req->rsp->nvme_cpl;
|
||||
struct spdk_nvme_cpl *first_response = &first_req->rsp->nvme_cpl;
|
||||
|
||||
spdk_bdev_io_get_nvme_fused_status(bdev_io, &cdw0, &second_sct, &second_sc, &first_sct, &first_sc);
|
||||
fused_response->cdw0 = cdw0;
|
||||
fused_response->status.sc = second_sc;
|
||||
fused_response->status.sct = second_sct;
|
||||
spdk_bdev_io_get_nvme_fused_status(bdev_io, &cdw0, &first_sct, &first_sc, &sct, &sc);
|
||||
first_response->cdw0 = cdw0;
|
||||
first_response->status.sc = first_sc;
|
||||
first_response->status.sct = first_sct;
|
||||
|
||||
/* first request should be completed */
|
||||
spdk_nvmf_request_complete(first_req);
|
||||
req->first_fused_req = NULL;
|
||||
} else {
|
||||
spdk_bdev_io_get_nvme_status(bdev_io, &cdw0, &first_sct, &first_sc);
|
||||
spdk_bdev_io_get_nvme_status(bdev_io, &cdw0, &sct, &sc);
|
||||
}
|
||||
|
||||
response->cdw0 = cdw0;
|
||||
response->status.sc = first_sc;
|
||||
response->status.sct = first_sct;
|
||||
response->status.sc = sc;
|
||||
response->status.sct = sct;
|
||||
|
||||
spdk_nvmf_request_complete(req);
|
||||
spdk_bdev_free_io(bdev_io);
|
||||
|
Loading…
Reference in New Issue
Block a user