All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] nvmet: Fix conventional passthru
       [not found] <CGME20210812210404uscas1p19e91deb256e3baf6071788a70e35ab6f@uscas1p1.samsung.com>
@ 2021-08-12 21:04   ` Adam Manzanares
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Manzanares @ 2021-08-12 21:04 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	Chaitanya Kulkarni, open list:NVM EXPRESS DRIVER, open list
  Cc: Adam Manzanares

Currently nvme_init_cap unconditionally sets support for one or more command
sets. When namespace identify descriptors are parsed it is expected that
the command set identifier is present, which is not always true for a
conventional namespace.

Signed-off-by: Adam Manzanares <a.manzanares@samsung.com>
---
 drivers/nvme/host/core.c   |  5 -----
 drivers/nvme/host/nvme.h   |  5 +++++
 drivers/nvme/target/core.c | 12 +++++++++---
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 2f0cbaba12ac..dd6c01105c11 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1306,11 +1306,6 @@ static int nvme_identify_ctrl(struct nvme_ctrl *dev, struct nvme_id_ctrl **id)
 	return error;
 }
 
-static bool nvme_multi_css(struct nvme_ctrl *ctrl)
-{
-	return (ctrl->ctrl_config & NVME_CC_CSS_MASK) == NVME_CC_CSS_CSI;
-}
-
 static int nvme_process_ns_desc(struct nvme_ctrl *ctrl, struct nvme_ns_ids *ids,
 		struct nvme_ns_id_desc *cur, bool *csi_seen)
 {
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 26511794629b..dc93d2bd68b8 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -919,4 +919,9 @@ struct nvme_ctrl *nvme_ctrl_from_file(struct file *file);
 struct nvme_ns *nvme_find_get_ns(struct nvme_ctrl *ctrl, unsigned nsid);
 void nvme_put_ns(struct nvme_ns *ns);
 
+static inline bool nvme_multi_css(struct nvme_ctrl *ctrl)
+{
+	return (ctrl->ctrl_config & NVME_CC_CSS_MASK) == NVME_CC_CSS_CSI;
+}
+
 #endif /* _NVME_H */
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 66d05eecc2a9..d8eac7ccb54c 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -9,6 +9,7 @@
 #include <linux/rculist.h>
 #include <linux/pci-p2pdma.h>
 #include <linux/scatterlist.h>
+#include "../host/nvme.h"
 
 #define CREATE_TRACE_POINTS
 #include "trace.h"
@@ -1196,12 +1197,13 @@ void nvmet_update_cc(struct nvmet_ctrl *ctrl, u32 new)
 	mutex_unlock(&ctrl->lock);
 }
 
-static void nvmet_init_cap(struct nvmet_ctrl *ctrl)
+static void nvmet_init_cap(struct nvmet_ctrl *ctrl, struct nvme_ctrl *ptctrl)
 {
 	/* command sets supported: NVMe command set: */
 	ctrl->cap = (1ULL << 37);
 	/* Controller supports one or more I/O Command Sets */
-	ctrl->cap |= (1ULL << 43);
+	if ((ptctrl && nvme_multi_css(ptctrl)) || !ptctrl)
+		ctrl->cap |= (1ULL << 43);
 	/* CC.EN timeout in 500msec units: */
 	ctrl->cap |= (15ULL << 24);
 	/* maximum queue entries supported: */
@@ -1363,7 +1365,11 @@ u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn,
 		goto out_put_subsystem;
 	mutex_init(&ctrl->lock);
 
-	nvmet_init_cap(ctrl);
+#ifdef CONFIG_NVME_TARGET_PASSTHRU
+	nvmet_init_cap(ctrl, subsys->passthru_ctrl);
+#elif
+	nvmet_init_cap(ctrl, NULL);
+#endif
 
 	ctrl->port = req->port;
 
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [RFC PATCH] nvmet: Fix conventional passthru
@ 2021-08-12 21:04   ` Adam Manzanares
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Manzanares @ 2021-08-12 21:04 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	Chaitanya Kulkarni, open list:NVM EXPRESS DRIVER, open list
  Cc: Adam Manzanares

Currently nvme_init_cap unconditionally sets support for one or more command
sets. When namespace identify descriptors are parsed it is expected that
the command set identifier is present, which is not always true for a
conventional namespace.

Signed-off-by: Adam Manzanares <a.manzanares@samsung.com>
---
 drivers/nvme/host/core.c   |  5 -----
 drivers/nvme/host/nvme.h   |  5 +++++
 drivers/nvme/target/core.c | 12 +++++++++---
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 2f0cbaba12ac..dd6c01105c11 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1306,11 +1306,6 @@ static int nvme_identify_ctrl(struct nvme_ctrl *dev, struct nvme_id_ctrl **id)
 	return error;
 }
 
-static bool nvme_multi_css(struct nvme_ctrl *ctrl)
-{
-	return (ctrl->ctrl_config & NVME_CC_CSS_MASK) == NVME_CC_CSS_CSI;
-}
-
 static int nvme_process_ns_desc(struct nvme_ctrl *ctrl, struct nvme_ns_ids *ids,
 		struct nvme_ns_id_desc *cur, bool *csi_seen)
 {
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 26511794629b..dc93d2bd68b8 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -919,4 +919,9 @@ struct nvme_ctrl *nvme_ctrl_from_file(struct file *file);
 struct nvme_ns *nvme_find_get_ns(struct nvme_ctrl *ctrl, unsigned nsid);
 void nvme_put_ns(struct nvme_ns *ns);
 
+static inline bool nvme_multi_css(struct nvme_ctrl *ctrl)
+{
+	return (ctrl->ctrl_config & NVME_CC_CSS_MASK) == NVME_CC_CSS_CSI;
+}
+
 #endif /* _NVME_H */
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 66d05eecc2a9..d8eac7ccb54c 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -9,6 +9,7 @@
 #include <linux/rculist.h>
 #include <linux/pci-p2pdma.h>
 #include <linux/scatterlist.h>
+#include "../host/nvme.h"
 
 #define CREATE_TRACE_POINTS
 #include "trace.h"
@@ -1196,12 +1197,13 @@ void nvmet_update_cc(struct nvmet_ctrl *ctrl, u32 new)
 	mutex_unlock(&ctrl->lock);
 }
 
-static void nvmet_init_cap(struct nvmet_ctrl *ctrl)
+static void nvmet_init_cap(struct nvmet_ctrl *ctrl, struct nvme_ctrl *ptctrl)
 {
 	/* command sets supported: NVMe command set: */
 	ctrl->cap = (1ULL << 37);
 	/* Controller supports one or more I/O Command Sets */
-	ctrl->cap |= (1ULL << 43);
+	if ((ptctrl && nvme_multi_css(ptctrl)) || !ptctrl)
+		ctrl->cap |= (1ULL << 43);
 	/* CC.EN timeout in 500msec units: */
 	ctrl->cap |= (15ULL << 24);
 	/* maximum queue entries supported: */
@@ -1363,7 +1365,11 @@ u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn,
 		goto out_put_subsystem;
 	mutex_init(&ctrl->lock);
 
-	nvmet_init_cap(ctrl);
+#ifdef CONFIG_NVME_TARGET_PASSTHRU
+	nvmet_init_cap(ctrl, subsys->passthru_ctrl);
+#elif
+	nvmet_init_cap(ctrl, NULL);
+#endif
 
 	ctrl->port = req->port;
 
-- 
2.25.1

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] nvmet: Fix conventional passthru
  2021-08-12 21:04   ` Adam Manzanares
  (?)
@ 2021-08-13  0:14   ` kernel test robot
  -1 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-08-13  0:14 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6194 bytes --]

Hi Adam,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.14-rc5 next-20210812]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Adam-Manzanares/nvmet-Fix-conventional-passthru/20210813-051456
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f8fbb47c6e86c0b75f8df864db702c3e3f757361
config: microblaze-randconfig-r015-20210809 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/05175480696ae235d783d7a46b5cc1f42a0ad4c6
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Adam-Manzanares/nvmet-Fix-conventional-passthru/20210813-051456
        git checkout 05175480696ae235d783d7a46b5cc1f42a0ad4c6
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=microblaze SHELL=/bin/bash drivers/nvme/target/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/nvme/target/core.c: In function 'nvmet_alloc_ctrl':
>> drivers/nvme/target/core.c:1369:6: error: #elif with no expression
    1369 | #elif
         |      ^
   At top level:
   drivers/nvme/target/core.c:1199:13: warning: 'nvmet_init_cap' defined but not used [-Wunused-function]
    1199 | static void nvmet_init_cap(struct nvmet_ctrl *ctrl, struct nvme_ctrl *ptctrl)
         |             ^~~~~~~~~~~~~~


vim +1369 drivers/nvme/target/core.c

  1330	
  1331	u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn,
  1332			struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp)
  1333	{
  1334		struct nvmet_subsys *subsys;
  1335		struct nvmet_ctrl *ctrl;
  1336		int ret;
  1337		u16 status;
  1338	
  1339		status = NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR;
  1340		subsys = nvmet_find_get_subsys(req->port, subsysnqn);
  1341		if (!subsys) {
  1342			pr_warn("connect request for invalid subsystem %s!\n",
  1343				subsysnqn);
  1344			req->cqe->result.u32 = IPO_IATTR_CONNECT_DATA(subsysnqn);
  1345			req->error_loc = offsetof(struct nvme_common_command, dptr);
  1346			goto out;
  1347		}
  1348	
  1349		down_read(&nvmet_config_sem);
  1350		if (!nvmet_host_allowed(subsys, hostnqn)) {
  1351			pr_info("connect by host %s for subsystem %s not allowed\n",
  1352				hostnqn, subsysnqn);
  1353			req->cqe->result.u32 = IPO_IATTR_CONNECT_DATA(hostnqn);
  1354			up_read(&nvmet_config_sem);
  1355			status = NVME_SC_CONNECT_INVALID_HOST | NVME_SC_DNR;
  1356			req->error_loc = offsetof(struct nvme_common_command, dptr);
  1357			goto out_put_subsystem;
  1358		}
  1359		up_read(&nvmet_config_sem);
  1360	
  1361		status = NVME_SC_INTERNAL;
  1362		ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
  1363		if (!ctrl)
  1364			goto out_put_subsystem;
  1365		mutex_init(&ctrl->lock);
  1366	
  1367	#ifdef CONFIG_NVME_TARGET_PASSTHRU
  1368		nvmet_init_cap(ctrl, subsys->passthru_ctrl);
> 1369	#elif
  1370		nvmet_init_cap(ctrl, NULL);
  1371	#endif
  1372	
  1373		ctrl->port = req->port;
  1374	
  1375		INIT_WORK(&ctrl->async_event_work, nvmet_async_event_work);
  1376		INIT_LIST_HEAD(&ctrl->async_events);
  1377		INIT_RADIX_TREE(&ctrl->p2p_ns_map, GFP_KERNEL);
  1378		INIT_WORK(&ctrl->fatal_err_work, nvmet_fatal_error_handler);
  1379		INIT_DELAYED_WORK(&ctrl->ka_work, nvmet_keep_alive_timer);
  1380	
  1381		memcpy(ctrl->subsysnqn, subsysnqn, NVMF_NQN_SIZE);
  1382		memcpy(ctrl->hostnqn, hostnqn, NVMF_NQN_SIZE);
  1383	
  1384		kref_init(&ctrl->ref);
  1385		ctrl->subsys = subsys;
  1386		WRITE_ONCE(ctrl->aen_enabled, NVMET_AEN_CFG_OPTIONAL);
  1387	
  1388		ctrl->changed_ns_list = kmalloc_array(NVME_MAX_CHANGED_NAMESPACES,
  1389				sizeof(__le32), GFP_KERNEL);
  1390		if (!ctrl->changed_ns_list)
  1391			goto out_free_ctrl;
  1392	
  1393		ctrl->sqs = kcalloc(subsys->max_qid + 1,
  1394				sizeof(struct nvmet_sq *),
  1395				GFP_KERNEL);
  1396		if (!ctrl->sqs)
  1397			goto out_free_changed_ns_list;
  1398	
  1399		if (subsys->cntlid_min > subsys->cntlid_max)
  1400			goto out_free_sqs;
  1401	
  1402		ret = ida_simple_get(&cntlid_ida,
  1403				     subsys->cntlid_min, subsys->cntlid_max,
  1404				     GFP_KERNEL);
  1405		if (ret < 0) {
  1406			status = NVME_SC_CONNECT_CTRL_BUSY | NVME_SC_DNR;
  1407			goto out_free_sqs;
  1408		}
  1409		ctrl->cntlid = ret;
  1410	
  1411		ctrl->ops = req->ops;
  1412	
  1413		/*
  1414		 * Discovery controllers may use some arbitrary high value
  1415		 * in order to cleanup stale discovery sessions
  1416		 */
  1417		if ((ctrl->subsys->type == NVME_NQN_DISC) && !kato)
  1418			kato = NVMET_DISC_KATO_MS;
  1419	
  1420		/* keep-alive timeout in seconds */
  1421		ctrl->kato = DIV_ROUND_UP(kato, 1000);
  1422	
  1423		ctrl->err_counter = 0;
  1424		spin_lock_init(&ctrl->error_lock);
  1425	
  1426		nvmet_start_keep_alive_timer(ctrl);
  1427	
  1428		mutex_lock(&subsys->lock);
  1429		list_add_tail(&ctrl->subsys_entry, &subsys->ctrls);
  1430		nvmet_setup_p2p_ns_map(ctrl, req);
  1431		mutex_unlock(&subsys->lock);
  1432	
  1433		*ctrlp = ctrl;
  1434		return 0;
  1435	
  1436	out_free_sqs:
  1437		kfree(ctrl->sqs);
  1438	out_free_changed_ns_list:
  1439		kfree(ctrl->changed_ns_list);
  1440	out_free_ctrl:
  1441		kfree(ctrl);
  1442	out_put_subsystem:
  1443		nvmet_subsys_put(subsys);
  1444	out:
  1445		return status;
  1446	}
  1447	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35046 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] nvmet: Fix conventional passthru
  2021-08-12 21:04   ` Adam Manzanares
  (?)
  (?)
@ 2021-08-13  0:28   ` kernel test robot
  -1 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-08-13  0:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5941 bytes --]

Hi Adam,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.14-rc5 next-20210812]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Adam-Manzanares/nvmet-Fix-conventional-passthru/20210813-051456
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f8fbb47c6e86c0b75f8df864db702c3e3f757361
config: x86_64-randconfig-r014-20210809 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/05175480696ae235d783d7a46b5cc1f42a0ad4c6
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Adam-Manzanares/nvmet-Fix-conventional-passthru/20210813-051456
        git checkout 05175480696ae235d783d7a46b5cc1f42a0ad4c6
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/nvme/target/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/nvme/target/core.c:1369:6: error: expected value in expression
   #elif
        ^
   1 error generated.


vim +1369 drivers/nvme/target/core.c

  1330	
  1331	u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn,
  1332			struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp)
  1333	{
  1334		struct nvmet_subsys *subsys;
  1335		struct nvmet_ctrl *ctrl;
  1336		int ret;
  1337		u16 status;
  1338	
  1339		status = NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR;
  1340		subsys = nvmet_find_get_subsys(req->port, subsysnqn);
  1341		if (!subsys) {
  1342			pr_warn("connect request for invalid subsystem %s!\n",
  1343				subsysnqn);
  1344			req->cqe->result.u32 = IPO_IATTR_CONNECT_DATA(subsysnqn);
  1345			req->error_loc = offsetof(struct nvme_common_command, dptr);
  1346			goto out;
  1347		}
  1348	
  1349		down_read(&nvmet_config_sem);
  1350		if (!nvmet_host_allowed(subsys, hostnqn)) {
  1351			pr_info("connect by host %s for subsystem %s not allowed\n",
  1352				hostnqn, subsysnqn);
  1353			req->cqe->result.u32 = IPO_IATTR_CONNECT_DATA(hostnqn);
  1354			up_read(&nvmet_config_sem);
  1355			status = NVME_SC_CONNECT_INVALID_HOST | NVME_SC_DNR;
  1356			req->error_loc = offsetof(struct nvme_common_command, dptr);
  1357			goto out_put_subsystem;
  1358		}
  1359		up_read(&nvmet_config_sem);
  1360	
  1361		status = NVME_SC_INTERNAL;
  1362		ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
  1363		if (!ctrl)
  1364			goto out_put_subsystem;
  1365		mutex_init(&ctrl->lock);
  1366	
  1367	#ifdef CONFIG_NVME_TARGET_PASSTHRU
  1368		nvmet_init_cap(ctrl, subsys->passthru_ctrl);
> 1369	#elif
  1370		nvmet_init_cap(ctrl, NULL);
  1371	#endif
  1372	
  1373		ctrl->port = req->port;
  1374	
  1375		INIT_WORK(&ctrl->async_event_work, nvmet_async_event_work);
  1376		INIT_LIST_HEAD(&ctrl->async_events);
  1377		INIT_RADIX_TREE(&ctrl->p2p_ns_map, GFP_KERNEL);
  1378		INIT_WORK(&ctrl->fatal_err_work, nvmet_fatal_error_handler);
  1379		INIT_DELAYED_WORK(&ctrl->ka_work, nvmet_keep_alive_timer);
  1380	
  1381		memcpy(ctrl->subsysnqn, subsysnqn, NVMF_NQN_SIZE);
  1382		memcpy(ctrl->hostnqn, hostnqn, NVMF_NQN_SIZE);
  1383	
  1384		kref_init(&ctrl->ref);
  1385		ctrl->subsys = subsys;
  1386		WRITE_ONCE(ctrl->aen_enabled, NVMET_AEN_CFG_OPTIONAL);
  1387	
  1388		ctrl->changed_ns_list = kmalloc_array(NVME_MAX_CHANGED_NAMESPACES,
  1389				sizeof(__le32), GFP_KERNEL);
  1390		if (!ctrl->changed_ns_list)
  1391			goto out_free_ctrl;
  1392	
  1393		ctrl->sqs = kcalloc(subsys->max_qid + 1,
  1394				sizeof(struct nvmet_sq *),
  1395				GFP_KERNEL);
  1396		if (!ctrl->sqs)
  1397			goto out_free_changed_ns_list;
  1398	
  1399		if (subsys->cntlid_min > subsys->cntlid_max)
  1400			goto out_free_sqs;
  1401	
  1402		ret = ida_simple_get(&cntlid_ida,
  1403				     subsys->cntlid_min, subsys->cntlid_max,
  1404				     GFP_KERNEL);
  1405		if (ret < 0) {
  1406			status = NVME_SC_CONNECT_CTRL_BUSY | NVME_SC_DNR;
  1407			goto out_free_sqs;
  1408		}
  1409		ctrl->cntlid = ret;
  1410	
  1411		ctrl->ops = req->ops;
  1412	
  1413		/*
  1414		 * Discovery controllers may use some arbitrary high value
  1415		 * in order to cleanup stale discovery sessions
  1416		 */
  1417		if ((ctrl->subsys->type == NVME_NQN_DISC) && !kato)
  1418			kato = NVMET_DISC_KATO_MS;
  1419	
  1420		/* keep-alive timeout in seconds */
  1421		ctrl->kato = DIV_ROUND_UP(kato, 1000);
  1422	
  1423		ctrl->err_counter = 0;
  1424		spin_lock_init(&ctrl->error_lock);
  1425	
  1426		nvmet_start_keep_alive_timer(ctrl);
  1427	
  1428		mutex_lock(&subsys->lock);
  1429		list_add_tail(&ctrl->subsys_entry, &subsys->ctrls);
  1430		nvmet_setup_p2p_ns_map(ctrl, req);
  1431		mutex_unlock(&subsys->lock);
  1432	
  1433		*ctrlp = ctrl;
  1434		return 0;
  1435	
  1436	out_free_sqs:
  1437		kfree(ctrl->sqs);
  1438	out_free_changed_ns_list:
  1439		kfree(ctrl->changed_ns_list);
  1440	out_free_ctrl:
  1441		kfree(ctrl);
  1442	out_put_subsystem:
  1443		nvmet_subsys_put(subsys);
  1444	out:
  1445		return status;
  1446	}
  1447	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30746 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-13  0:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20210812210404uscas1p19e91deb256e3baf6071788a70e35ab6f@uscas1p1.samsung.com>
2021-08-12 21:04 ` [RFC PATCH] nvmet: Fix conventional passthru Adam Manzanares
2021-08-12 21:04   ` Adam Manzanares
2021-08-13  0:14   ` kernel test robot
2021-08-13  0:28   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.