nvmf: remove qpair state activating.
This intermediate state is unused and meaningless. the qpair transitions into this state right before calling a synchronous operation and then transitions to active as soon as that operation completes successfully. If the operation did not complete successfully, we were leaving qpairs in this weird intermediate state when for all intents and purposes they had reverted to an uninitialized state. Keeping qpairs in the uninitialized state until they have been added to a poll group creates a meaningful distinction between states that can be actionable from the transport level. Change-Id: I6de9bc424b393b6fff221aa2f4212aaa91488629 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/443471 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
b952668186
commit
145485769e
@ -652,7 +652,6 @@ spdk_nvmf_poll_group_add(struct spdk_nvmf_poll_group *group,
|
||||
|
||||
TAILQ_INIT(&qpair->outstanding);
|
||||
qpair->group = group;
|
||||
spdk_nvmf_qpair_set_state(qpair, SPDK_NVMF_QPAIR_ACTIVATING);
|
||||
|
||||
TAILQ_FOREACH(tgroup, &group->tgroups, link) {
|
||||
if (tgroup->transport == qpair->transport) {
|
||||
|
@ -66,7 +66,6 @@ enum spdk_nvmf_subsystem_state {
|
||||
|
||||
enum spdk_nvmf_qpair_state {
|
||||
SPDK_NVMF_QPAIR_UNINITIALIZED = 0,
|
||||
SPDK_NVMF_QPAIR_ACTIVATING,
|
||||
SPDK_NVMF_QPAIR_ACTIVE,
|
||||
SPDK_NVMF_QPAIR_DEACTIVATING,
|
||||
SPDK_NVMF_QPAIR_ERROR,
|
||||
|
@ -2698,10 +2698,9 @@ spdk_nvmf_rdma_close_qpair(struct spdk_nvmf_qpair *qpair)
|
||||
rqpair->disconnect_flags |= RDMA_QP_DISCONNECTING;
|
||||
|
||||
/* This happens only when the qpair is disconnected before
|
||||
* it is added to the poll group. SInce there is no poll group,
|
||||
* we will never reap the I/O for this connection. This also
|
||||
* means that we have not accepted the connection request yet,
|
||||
* so we need to reject it.
|
||||
* it is added to the poll group. Since there is no poll group,
|
||||
* the RDMA qp has not been initialized yet and the RDMA CM
|
||||
* event has not yet been acknowledged, so we need to reject it.
|
||||
*/
|
||||
if (rqpair->qpair.state == SPDK_NVMF_QPAIR_UNINITIALIZED) {
|
||||
spdk_nvmf_rdma_qpair_reject_connection(rqpair);
|
||||
|
Loading…
x
Reference in New Issue
Block a user