nvme: add qpair is_connecting flag
This will be used on the adminq, and set while the qpair is connecting. It allows the qpair_process_completions routine to know that it should still try to process completions, even if the controller is resetting. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I377b9c934295eb5f45f03efd90c2a268defb4bd4 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453938 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: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
36d2149a70
commit
5309873d39
@ -331,6 +331,7 @@ struct spdk_nvme_qpair {
|
|||||||
uint8_t qprio;
|
uint8_t qprio;
|
||||||
|
|
||||||
uint8_t is_enabled : 1;
|
uint8_t is_enabled : 1;
|
||||||
|
uint8_t is_connecting: 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Members for handling IO qpair deletion inside of a completion context.
|
* Members for handling IO qpair deletion inside of a completion context.
|
||||||
|
@ -425,7 +425,7 @@ spdk_nvme_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spdk_unlikely(!nvme_qpair_check_enabled(qpair))) {
|
if (spdk_unlikely(!nvme_qpair_check_enabled(qpair) && !qpair->is_connecting)) {
|
||||||
/*
|
/*
|
||||||
* qpair is not enabled, likely because a controller reset is
|
* qpair is not enabled, likely because a controller reset is
|
||||||
* in progress.
|
* in progress.
|
||||||
|
@ -182,7 +182,13 @@ 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;
|
||||||
|
}
|
||||||
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
volatile struct spdk_nvme_registers *
|
volatile struct spdk_nvme_registers *
|
||||||
|
Loading…
Reference in New Issue
Block a user