From e36f83d64eeb72e4d31c05d5953738e823efca10 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Thu, 17 Aug 2017 22:18:52 +0800 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/374486 Tested-by: SPDK Automated Test System Reviewed-by: GangCao Reviewed-by: Daniel Verkamp Reviewed-by: Jim Harris --- CHANGELOG.md | 5 +++++ etc/spdk/iscsi.conf.in | 6 ++++-- etc/spdk/nvmf.conf.in | 6 ++++-- etc/spdk/vhost.conf.in | 4 ---- lib/bdev/nvme/bdev_nvme.c | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c137a59f..01459474b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/etc/spdk/iscsi.conf.in b/etc/spdk/iscsi.conf.in index 19375de48..abd20f071 100644 --- a/etc/spdk/iscsi.conf.in +++ b/etc/spdk/iscsi.conf.in @@ -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. diff --git a/etc/spdk/nvmf.conf.in b/etc/spdk/nvmf.conf.in index febd2cf03..bc177af27 100644 --- a/etc/spdk/nvmf.conf.in +++ b/etc/spdk/nvmf.conf.in @@ -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] diff --git a/etc/spdk/vhost.conf.in b/etc/spdk/vhost.conf.in index a8fbeddad..6419f2d47 100644 --- a/etc/spdk/vhost.conf.in +++ b/etc/spdk/vhost.conf.in @@ -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: diff --git a/lib/bdev/nvme/bdev_nvme.c b/lib/bdev/nvme/bdev_nvme.c index 3b27bcde9..90ac6f6f0 100644 --- a/lib/bdev/nvme/bdev_nvme.c +++ b/lib/bdev/nvme/bdev_nvme.c @@ -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");