Spdk/module/bdev/nvme
Jim Harris ba7b55de87 bdev/nvme: do not destruct ctrlr if reset is in progress
The adminq poller could get a failure if the ctrlr has
already been hot removed, which starts a reset.

But while the for_each_channel is running for the reset,
the hotplug poller could run and start the destruct
process.  If the ctrlr is deleted before the for_each_channel
completes, we will try to call spdk_nvme_ctrlr_reset() on
a deleted controller.

While here, also add a check to skip the reset if the
controller is already in the process of being removed.

Fixes #1273.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I20286814d904b8d5a9c5209bbb53663683a4e6b0

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1253
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-16 08:45:22 +00:00
..
bdev_nvme_cuse_rpc.c lib/nvme: remove device name parameter from nvme cuse 2019-12-09 17:40:35 +00:00
bdev_nvme_rpc.c vbdev: close the base bdev on its opened thread 2020-02-25 10:46:40 +00:00
bdev_nvme.c bdev/nvme: do not destruct ctrlr if reset is in progress 2020-03-16 08:45:22 +00:00
bdev_nvme.h bdev/nvme: Add 'delay_cmd_submit' to nvme bdev options 2019-12-10 17:32:10 +00:00
bdev_ocssd_rpc.c bdev/ocssd: fixed leaking range buffer 2019-12-23 08:43:34 +00:00
bdev_ocssd.c bdev/ocssd: track outstanding admin commands 2020-03-13 08:53:39 +00:00
bdev_ocssd.h bdev/ocssd: media management events 2019-12-20 10:02:15 +00:00
common.c bdev/nvme: do not destruct ctrlr if reset is in progress 2020-03-16 08:45:22 +00:00
common.h bdev/nvme: do not destruct ctrlr if reset is in progress 2020-03-16 08:45:22 +00:00
Makefile bdev/ftl: Remove NVMe dependencies 2020-01-15 12:24:44 +00:00
nvme_rpc.c nvme/rpc: fix memory leak when cmdbuf decode fails for bdev_nvme_send_cmd 2020-02-10 10:24:28 +00:00
vbdev_opal_rpc.c bdev/opal: Add rpc commands for multiuser 2019-10-24 17:09:57 +00:00
vbdev_opal.c module/opal: fix use of wrong ch when queueing IO 2020-02-13 09:52:46 +00:00
vbdev_opal.h bdev/opal: Add rpc commands for multiuser 2019-10-24 17:09:57 +00:00