From 5e78085c6a92d3f758d56d49c69ad039950d865c Mon Sep 17 00:00:00 2001 From: Tao Jiang Date: Wed, 18 Nov 2020 10:07:21 +0800 Subject: [PATCH] nvme-fabrics: modify default value to reconnect forever driver inclusion category: bugfix bugzilla: NA CVE: NA Link: https://gitee.com/openeuler/kernel/issues/I1WGZE ------------------------------------------------- Modify the default value of reconnect to -1, which means reconnect forever. Signed-off-by: Tao Jiang Reviewed-by: Chao Leng Reviewed-by: Jike Cheng Signed-off-by: Lijie Acked-by: Hanjun Guo Signed-off-by: Yang Yingliang --- drivers/nvme/host/fabrics.c | 2 +- drivers/nvme/host/fabrics.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c index bcd09d3a44da..738794af3f38 100644 --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c @@ -617,7 +617,7 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts, char *options, *o, *p; int token, ret = 0; size_t nqnlen = 0; - int ctrl_loss_tmo = NVMF_DEF_CTRL_LOSS_TMO; + int ctrl_loss_tmo = NVMF_DEF_RECONNECT_FOREVER; uuid_t hostid; /* Set defaults */ diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h index aa2fdb2a2e8f..188ebbeec32c 100644 --- a/drivers/nvme/host/fabrics.h +++ b/drivers/nvme/host/fabrics.h @@ -23,6 +23,7 @@ #define NVMF_DEF_RECONNECT_DELAY 10 /* default to 600 seconds of reconnect attempts before giving up */ #define NVMF_DEF_CTRL_LOSS_TMO 600 +#define NVMF_DEF_RECONNECT_FOREVER -1 /* * Define a host as seen by the target. We allocate one at boot, but also -- GitLab