Commit 9d39be44 authored by Seth Howell's avatar Seth Howell Committed by Tomasz Zawadzki
Browse files

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: default avatarSeth 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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 646f0665
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);
	}
}