Loading
bdev/nvme: Fix race between reset and qpair creation/deletion
We have the following race condition: 1) A reset is initiated. We iterate over all IO channels to destroy the qpairs. 2) A new IO channel is created. We create a nvme qpair. 3) The reset process continues. It iterates over all IO channels to recreate the nvme qpair. `reset_iter` is set on the IO channel created at step 2. (Note that we won't recreate a qpair for the IO channel created at step 2). 4) The IO channel created at step 2 gets deleted. `bdev_nvme_destroy_ctrlr_channel_cb` is called. We skip the qpair disconnection because `reset_iter` is set. In the end, the qpair is never disconnected. Ensure that we always disconnect qpairs, even if a reset is in progress. Change-Id: I48af99ed582ebfdcaf2a98a92e9077c048bc7c54 Signed-off-by:Alex Michon <amichon@kalrayinc.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/25430 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Community-CI: Community CI Samsung <spdk.community.ci.samsung@gmail.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>