The API spdk_nvme_ctrlr_free_io_qpair() returns immediately if the passed qpair is NULL, but calling spdk_nvme_ctrlr_free_io_qpair() with NULL should be avoided. This patch cleans up the code to ensure that nvme_ch->qpair is NULL if disconnected and spdk_nvme_ctrlr_free_io_qpair() is called only if nvme_ch->qpair is not NULL. Then add a test scenario that two reset requests were submitted simultaneously and the first reset request failed and then the second reset request also failed. This verifies the refactoring done in the next patch. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Iae461f7f826b0e1a4607a17e528c04a642242d6e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7041 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> |
||
---|---|---|
.. | ||
include | ||
lib | ||
Makefile | ||
unittest.sh |