bdev/nvme: Enable the timeout function if timeout value is provided
We should not add addtional check since we already have this option in timeout_cb function, the addtional check is unnecessary. Change-Id: I77c89303155e0c14072a1838994f9e76a0ffc0f4 Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/c/445319 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
7bf5e1dee3
commit
73c5108684
@ -1047,7 +1047,7 @@ create_ctrlr(struct spdk_nvme_ctrlr *ctrlr,
|
||||
|
||||
TAILQ_INSERT_TAIL(&g_nvme_ctrlrs, nvme_ctrlr, tailq);
|
||||
|
||||
if (g_opts.timeout_us > 0 && g_opts.action_on_timeout != SPDK_BDEV_NVME_TIMEOUT_ACTION_NONE) {
|
||||
if (g_opts.timeout_us > 0) {
|
||||
spdk_nvme_ctrlr_register_timeout_callback(ctrlr, g_opts.timeout_us,
|
||||
timeout_cb, NULL);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user