Spdk/lib/nvme
Tomasz Kulasek bf3d670796 lib/nvme: stop all NVMe io producers on detach
Now all registered producers should be stopped (unregistered) before
NVMe detach, otherwise NVMe controller cannot be safely detached.

This patch allows to stop all not unregistered io producers before
NVMe detach:

1. Callback to the "struct nvme_io_msg_producer" to stop producer
   started on selected controller.
2. On nvme_io_msg_ctrlr_detach() if there's some unregistered producers,
   stop all before freeing resources.

This approach also fixes issue with not to stop CUSE device when
NVMe controller is detached without unregistering producer (github
issue #1033).

	Fixes #1033

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474273 (master)

(cherry picked from commit fd2af7afa9)
Change-Id: Ia1ffef566bb745edb55c54d6786ea481a35bbefd
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478350
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-12-23 08:04:56 +00:00
..
Makefile lib/nvme: add NVMe character device 2019-10-24 23:43:59 +00:00
nvme_ctrlr_cmd.c nvme: add qpair parameter to nvme_complete_request 2019-05-22 14:51:01 +00:00
nvme_ctrlr_ocssd_cmd.c ocssd: hold lock when calling nvme_ctrlr_submit_admin_request 2019-02-15 21:27:58 +00:00
nvme_ctrlr.c nvme/cuse: Poll the io_msg queue when the admin queue is polled 2019-10-31 19:26:02 +00:00
nvme_cuse.c lib/nvme: stop all NVMe io producers on detach 2019-12-23 08:04:56 +00:00
nvme_cuse.h lib/nvme: add RPC for interacting with CUSE devices 2019-10-24 23:43:59 +00:00
nvme_fabric.c nvme: don't enable adminq until we know discovery_ctrlr exists 2019-12-23 08:04:56 +00:00
nvme_internal.h nvme: take the lock when disconnecting qpairs. 2019-10-30 16:57:49 +00:00
nvme_io_msg.c lib/nvme: stop all NVMe io producers on detach 2019-12-23 08:04:56 +00:00
nvme_io_msg.h lib/nvme: stop all NVMe io producers on detach 2019-12-23 08:04:56 +00:00
nvme_ns_cmd.c nvme: add support for write uncorrectable command 2019-09-26 18:42:57 +00:00
nvme_ns_ocssd_cmd.c vtophys: add length parameter to the vtophys function 2019-01-09 08:24:59 +00:00
nvme_ns.c nvme: add support for write uncorrectable command 2019-09-26 18:42:57 +00:00
nvme_opal_internal.h Opal: Add async function for revert TPer 2019-10-24 17:09:57 +00:00
nvme_opal.c opal: Fix get locking range info memory leak 2019-10-24 17:09:57 +00:00
nvme_pcie.c nvme: don't monitor hotplug events in secondary process 2019-12-23 08:04:56 +00:00
nvme_qpair.c nvme: don't disconnect qpairs from admin thread. 2019-10-31 19:26:02 +00:00
nvme_quirks.c nvme: add NVME_QUIRK_DELAY_BEFORE_INIT quirk 2019-08-26 17:35:06 +00:00
nvme_rdma.c nvme: take the lock when disconnecting qpairs. 2019-10-30 16:57:49 +00:00
nvme_tcp.c nvme_fabrics: move ctrlr_scan to common code. 2019-10-22 21:14:22 +00:00
nvme_transport.c nvme: combine qpair->is_connecting and is_enabled 2019-10-22 21:14:22 +00:00
nvme_uevent.c nvme: add vfio driver parse event 2019-05-29 02:36:41 +00:00
nvme_uevent.h nvme: Add support of hotplug for vfio-attached devices. 2017-12-06 17:04:49 -05:00
nvme.c lib/nvme: change api for io message 2019-12-23 08:04:56 +00:00