+28
−0
Loading
In cases where hotplug option is not enabled (via bdev_nvme_set_hotplug) we should still be able to detect unexpected hot-removes of underlying devices (otherwise we'll wait for a detach that never happens, see issue 3226 and prints at lib/env_dpdk/pci.c:235). Unless hotplug option is enabled, we do not want to attach to all available devices, so we should only watch for remove events. To achieve that, add a new polling function and assign it to 'g_hotplug_poller' upon first bdev_nvme_attach controller and unregister the poller after all controllers are removed. In essence, we'll always have a poller as long as at least one controller is present, regardless of hotplug being enabled. Fixes #3226 Change-Id: Iac281604e2fc3e108e16e415de4b19c50f0d3148 Signed-off-by:Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23575 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <jim.harris@samsung.com> Community-CI: Mellanox Build Bot Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com>