bdev_nvme: disable hotplug feature by default

When users don't enable hotplug option in their configuration
section, SPDK will enable it by default. DPDK will print probing
messages continuously for NVMe devices which don't belong to SPDK.

Change-Id: I8c43335a282ecba206b4b5305bd881d2bd07836e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/374486
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Changpeng Liu 2017-08-17 22:18:52 +08:00 committed by Jim Harris
parent 2eec131e4d
commit e36f83d64e
5 changed files with 14 additions and 9 deletions

View File

@ -2,6 +2,11 @@
## v17.10: (Upcoming Release)
### NVMe driver
Disable HotplugEnable option by default, users can enable it with
`HotplugEnable Yes` in `[Nvme]` section of the configuration file.
An [fio](http://github.com/axboe/fio) plugin was added that can route
I/O to the bdev layer. See the [plugin documentation](https://github.com/spdk/spdk/blob/master/examples/bdev/fio_plugin/README.md)
for more information.

View File

@ -108,8 +108,10 @@
# Units in microseconds.
AdminPollRate 100000
# Enable handling of hotplug (runtime insert and remove) events
HotplugEnable Yes
# Disable handling of hotplug (runtime insert and remove) events,
# users can set to Yes if want to enable it.
# Default: No
HotplugEnable No
# Users may change this section to create a different number or size of
# malloc LUNs.

View File

@ -101,8 +101,10 @@
# Units in microseconds.
AdminPollRate 100000
# Enable handling of hotplug (runtime insert and remove) events
HotplugEnable Yes
# Disable handling of hotplug (runtime insert and remove) events,
# users can set to Yes if want to enable it.
# Default: No
HotplugEnable No
# The Split virtual block device slices block devices into multiple smaller bdevs.
[Split]

View File

@ -87,10 +87,6 @@
# Units in microseconds.
AdminPollRate 100000
# Enable handling of hotplug (runtime insert and remove) events
# vhost currently does not support hotplug
HotplugEnable No
# The Split virtual block device slices block devices into multiple smaller bdevs.
[Split]
# Syntax:

View File

@ -1005,7 +1005,7 @@ bdev_nvme_library_init(void)
}
if (spdk_process_is_primary()) {
g_nvme_hotplug_enabled = spdk_conf_section_get_boolval(sp, "HotplugEnable", true);
g_nvme_hotplug_enabled = spdk_conf_section_get_boolval(sp, "HotplugEnable", false);
}
g_nvme_hotplug_poll_timeout_us = spdk_conf_section_get_intval(sp, "HotplugPollRate");