Spdk/module/bdev
Shuhei Matsumoto 2826ef13ce bdev/nvme: Fail reset sequence immediately if ctrlr is already removed.
After a controller was hot-removed, if a reset sequence started to
the controller, spdk_nvme_ctrlr_disconnect() failed and caused core
dump in debug mode.

When implemented, how to cause the failure and how to process the
failure were not clear. Hence assert was added to detect the
failure.

We know how we cause the failure now. Let's handle the failure
appropriately.

If spdk_nvme_ctrlr_disconnect() fails, we are on the nvme_ctrlr->thread.
Hence call bdev_nvme_reset_complete() with failure immediately.

Even if spdk_nvme_ctrlr_disconnect() completes synchronously, the
completion callback is executed asynchronously when polling an adminq.

Hence set the completion callback only if spdk_nvme_ctrlr_disconnect()
succeeds.

Fixes issue #2632

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I11f61853aba9eca2515592f964a291e59def7247
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13892
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-21 07:52:44 +00:00
..
aio bdev_aio: handle unexpected res=0 correctly 2022-09-16 13:32:40 +00:00
compress bdev/compress: make lb_size optional in bdev_compress_create 2022-07-04 07:23:26 +00:00
crypto util: made hexlify and unhexlify functions public 2022-09-06 07:17:13 +00:00
daos bdev/daos: introduction of daos bdev 2022-08-23 07:15:13 +00:00
delay check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
error Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
ftl ftl: check structure sizes for future ABI compatibility 2022-09-20 19:24:26 +00:00
gpt check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
iscsi bdev_iscsi: modify the timeout parameter name of iscsi opts 2022-09-09 13:02:25 +00:00
lvol vbdev_lvol: Implement SEEK_[DATA,HOLE] io type 2022-09-15 08:23:56 +00:00
malloc accel: Do not refer to the "framework" as "engine" 2022-09-06 07:16:17 +00:00
null Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvme bdev/nvme: Fail reset sequence immediately if ctrlr is already removed. 2022-09-21 07:52:44 +00:00
ocf check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
passthru check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
pmem Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
raid bdev/raid: fix flush on raid0 2022-09-14 07:44:19 +00:00
rbd bdev/rbd: return a error value(-1) when create RBD bdev on non 2022-09-13 07:28:57 +00:00
split check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
uring bdev/uring: Add support for zoned io in uring bdev. 2022-08-30 07:17:06 +00:00
virtio bdev_virtio: fix use-after-free in scsi scan_ctx 2022-08-29 10:51:48 +00:00
xnvme bdev/xnvme: save xnvme bdevs from runtime 2022-09-19 13:12:07 +00:00
zone_block Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
Makefile bdev/daos: introduction of daos bdev 2022-08-23 07:15:13 +00:00