nvmf/ctrlr: remove assert for qpair state.

Historically, we have immediately called the qpair
fini function directly from _spdk_nvmf_qpair_destroy.

However, to fix a race with initiators where we can get
a duplicate QID from the initiator, we will have to clear
the QID bit before calling qpair_fini. Clearing the QID bit
must be done on the controller thread, so we have to pass at
least two messages between calling _spdk_nvmf_qpair_destroy
and qpair_fini. This leaves a gap where we can poll the poll group
and reap completions for the qpair before we call qpair_fini and drain
all of the requests related with the qpair.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I337a0608f88fdda132b8a629a508c0263d2261c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1881
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Seth Howell 2020-04-16 00:03:43 -07:00 committed by Tomasz Zawadzki
parent 646f0665d5
commit 9d39be44c5

View File

@ -2789,8 +2789,6 @@ spdk_nvmf_qpair_request_cleanup(struct spdk_nvmf_qpair *qpair)
if (TAILQ_EMPTY(&qpair->outstanding)) {
qpair->state_cb(qpair->state_cb_arg, 0);
}
} else {
assert(qpair->state == SPDK_NVMF_QPAIR_ACTIVE);
}
}