nvme: Don't expose admin qpair in timeout callbacks

This was broken by commit 31bf5d795

Change-Id: I8c81c7b76cd47db347ce9c3f8a0e8296b690cb49
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/408240
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Ben Walker 2018-04-18 13:45:07 -07:00 committed by Daniel Verkamp
parent ec013016ed
commit 37ef0cca91

View File

@ -2015,7 +2015,7 @@ nvme_pcie_qpair_check_timeout(struct spdk_nvme_qpair *qpair)
continue;
}
if (qpair == NULL &&
if (nvme_qpair_is_admin_queue(qpair) &&
tr->req->cmd.opc == SPDK_NVME_OPC_ASYNC_EVENT_REQUEST) {
continue;
}
@ -2028,7 +2028,9 @@ nvme_pcie_qpair_check_timeout(struct spdk_nvme_qpair *qpair)
}
tr->timed_out = 1;
qpair->active_proc->timeout_cb_fn(qpair->active_proc->timeout_cb_arg, ctrlr, qpair, tr->cid);
qpair->active_proc->timeout_cb_fn(qpair->active_proc->timeout_cb_arg, ctrlr,
nvme_qpair_is_admin_queue(qpair) ? NULL : qpair,
tr->cid);
}
}