fd2af7afa9
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 Change-Id: Ia1ffef566bb745edb55c54d6786ea481a35bbefd Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474273 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>