nvme: allow fabrics commands during reconnect.
When doing a reset on an NVMe-oF target with active I/O qpairs, we need to be able to submit fabrics commands on them in order to perform a reset. Currently, resetting a fabric controller with any I/O qpairs active will cause the reset to hang indefinitely. Change-Id: Ic972a301390a4dd64adabedfe01aa4e5253e40b0 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469935 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
797aa7d813
commit
4473732398
@ -637,9 +637,9 @@ _nvme_qpair_submit_request(struct spdk_nvme_qpair *qpair, struct nvme_request *r
|
|||||||
|
|
||||||
if (spdk_likely(qpair->is_enabled)) {
|
if (spdk_likely(qpair->is_enabled)) {
|
||||||
rc = nvme_transport_qpair_submit_request(qpair, req);
|
rc = nvme_transport_qpair_submit_request(qpair, req);
|
||||||
} else if (nvme_qpair_is_admin_queue(qpair) && req->cmd.opc == SPDK_NVME_OPC_FABRIC) {
|
} else if (req->cmd.opc == SPDK_NVME_OPC_FABRIC && qpair->is_connecting) {
|
||||||
/* Always allow fabrics commands through on the admin qpair - these get
|
/* Always allow fabrics commands through - these get
|
||||||
* the controller out of reset state.
|
* the controller out of reset state.
|
||||||
*/
|
*/
|
||||||
rc = nvme_transport_qpair_submit_request(qpair, req);
|
rc = nvme_transport_qpair_submit_request(qpair, req);
|
||||||
} else {
|
} else {
|
||||||
|
@ -182,13 +182,9 @@ nvme_transport_ctrlr_delete_io_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_
|
|||||||
int
|
int
|
||||||
nvme_transport_ctrlr_connect_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_qpair *qpair)
|
nvme_transport_ctrlr_connect_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_qpair *qpair)
|
||||||
{
|
{
|
||||||
if (nvme_qpair_is_admin_queue(qpair)) {
|
qpair->is_connecting = 1;
|
||||||
qpair->is_connecting = 1;
|
|
||||||
}
|
|
||||||
NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_connect_qpair, (ctrlr, qpair));
|
NVME_TRANSPORT_CALL(ctrlr->trid.trtype, ctrlr_connect_qpair, (ctrlr, qpair));
|
||||||
if (nvme_qpair_is_admin_queue(qpair)) {
|
qpair->is_connecting = 0;
|
||||||
qpair->is_connecting = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
volatile struct spdk_nvme_registers *
|
volatile struct spdk_nvme_registers *
|
||||||
|
Loading…
Reference in New Issue
Block a user