+48
−7
+2
−0
Loading
Previously, we did not do any Controller Level Reset when disconnecting the admin qpair. However, for PCIe transport, we need to stop any activity of the controller, i.e., delete all I/O SQ and CQs before nvme_transport_ctrlr_disconnect_qpair_done() calls nvme_transport_qpair_abort_reqs() (i.e., nvme_pcie_qpair_abort_trackers()). Otherwise, some corruption may occur because completed I/Os may still be in progress on the NVMe device. Not to change any public API, nvme_pcie_ctrlr_disconnect_qpair() is a convenient place to initiate a Controller Level Reset because it is called from spdk_nvme_ctrlr_disconnect(). Then nvme_pcie_qpair_process_completions() can process it until completion. However, necessary functions are not accessible from PCIe transport. This patch adds two helper functions and guards us from some undesirable behaviors because it was not assumed that nvme_ctrlr_process_init() is called from the completion context and ends in the middle of transition. Signed-off-by:Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I3d986e94ba71b83beeff7e75cf92033b5fa6f075 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12559 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by:
Michael Haeuptle <michaelhaeuptle@gmail.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>