+3
−1
+3
−1
+6
−15
Loading
Cq can only be deleted when all qpairs attached to it are destroyed. The problem happened in nvme_rdma_poll_group_remove - we may destroy CQ before last qpair is destroyed. Destruction flow is quite complicated, and we can't just remove everything from nvme_rdma_poll_group_remove since other functions check if all qpairs requests are flushed - i.e. nvme_rdma_ctrlr_delete_io_qpair expects that qpair is empty and disconnected. If the user calls spdk_nvme_ctrlr_free_io_qpair and qpair is not disconnected, we have to start the disconnect process and wait for it to finish. To handle this case, add a flag destroy_in_progress to nvme_qpair and check it in nvme_rdma_ctrlr_disconnect_qpair to poll qpair until disconnected even if it is in async mode. Fixes #3016 Signed-off-by:Alexey Marchuk <alexeymar@nvidia.com> Change-Id: I796833f70f81d8b8552263b61b2f002890d6dea9 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18287 Reviewed-by:
Karol Latecki <karol.latecki@intel.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Community-CI: Mellanox Build Bot