nvme_ctrlr_disconnect_qpair() calls nvme_poll_group_disconnect_qpair() if the qpair uses a poll group, and nvme_poll_group_disconnect_qpair() calls nvme_ctrlr_disconnect_qpair() if the state of the qpair is not DISCONNECTING. This relationship made the code very complex. A few patches starting from this patch simplifies disconnect and free qpair operations. This patch swaps the ordering of nvme_ctrlr_disconnect_qpair() and spdk_nvme_poll_group_remove() in spdk_nvme_ctrlr_free_io_qpair(). This ensures the qpair is disconnected when spdk_nvme_ctrlr_free_io_qpair() calls spdk_nvme_poll_group_remove(). This enables us to limit spdk_nvme_poll_group_remove() to be available only for disconnected qpairs. Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I0601a74f953a2efc4f177a51a4450baea33533d4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10670 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> |
||
---|---|---|
.. | ||
Makefile | ||
nvme_ctrlr_ut.c |