Spdk/test/unit/lib/nvme
Shuhei Matsumoto 11ad02918a nvme: Swap ctrlr_disconnect_qpair() and poll_group_remove() in nvme_ctrlr_free_io_qpair()
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>
2022-06-30 13:32:30 -04:00
..
nvme_ctrlr_cmd.c nvme: Do not track a separate active namespace list 2022-06-30 13:32:30 -04:00
nvme_ctrlr_ocssd_cmd.c nvme: Do not track a separate active namespace list 2022-06-30 13:32:30 -04:00
nvme_ctrlr.c nvme: Swap ctrlr_disconnect_qpair() and poll_group_remove() in nvme_ctrlr_free_io_qpair() 2022-06-30 13:32:30 -04:00
nvme_cuse.c nvme: Add metadata support to io commands 2022-06-30 13:32:30 -04:00
nvme_fabric.c nvme/fabric: extract prop set/get to separate sync/async functions 2022-06-30 13:32:24 -04:00
nvme_io_msg.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
nvme_ns_cmd.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
nvme_ns_ocssd_cmd.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
nvme_ns.c spelling: test 2022-06-30 13:32:28 -04:00
nvme_opal.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
nvme_pcie_common.c nvme/pcie: only set qpair state from qpair's thread 2022-06-30 13:32:27 -04:00
nvme_pcie.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
nvme_poll_group.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
nvme_qpair.c ut/nvme_qpair: add missing mutex init 2022-06-30 13:32:25 -04:00
nvme_quirks.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
nvme_rdma.c nvme/rdma: Correct qpair disconnect process 2022-06-30 13:32:29 -04:00
nvme_tcp.c spelling: test 2022-06-30 13:32:28 -04:00
nvme_transport.c nvme: abort outstanding requests case by case 2022-06-30 13:32:28 -04:00
nvme.c spelling: test 2022-06-30 13:32:28 -04:00
Makefile test/nvme_opal: build nvme_opal unittest file 2021-06-07 07:24:47 +00:00