bdev/nvme: set hotplug poller with default period value

If users didn't set the "HotplugPollRate" field, the value
will be set to NVME_HOTPLUG_POLL_PERIOD_MAX, which isn't
aligned with our design purpose.

Change-Id: I9795d7a16a1cc44ed4de7c40f376c563d977b455
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/445077
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Changpeng Liu 2019-02-18 03:01:21 -05:00
parent ec50de0957
commit f8dfbc5e9f

View File

@ -1408,6 +1408,9 @@ bdev_nvme_library_init(void)
}
hotplug_period = spdk_conf_section_get_intval(sp, "HotplugPollRate");
if (hotplug_period < 0) {
hotplug_period = 0;
}
g_nvme_hostnqn = spdk_conf_section_get_val(sp, "HostNQN");
probe_ctx->hostnqn = g_nvme_hostnqn;