All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 0/3] nvmet: unique discovery subsystem
@ 2022-04-06 14:22 Hannes Reinecke
  2022-04-06 14:22 ` [PATCH 1/3] nvmet: make the subsystem type configurable Hannes Reinecke
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Hannes Reinecke @ 2022-04-06 14:22 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

Hi all,

here's my third attempt to support unique discovery subsystems, heavily
modified from the previous two attempts.

The main idea is to not create the discovery subsystem per default, but
rather require the admin to create one.
As this is an incompatible change I've added a module parameter
'expose_discovery_subsys' to switch to the new behaviour.
The admin then need to configure the subsystem as normal by linking
it into the ports where the discovery subsystem should be visible.
And the discovery log then includes all configured ports to all
configured subsystems, as usual modified by whether the host may
access this subsystem or not.

Currently, there is no restriction on the number of discovery subsystems;
technically one can create any number of them. But this is primarily
because I'm too lazy to check (and we don't have a global enumeration for
subsystems) and not due to a design decision.

As usual, comments and reviews are welcome.

Changes to v2:
- Heavily rework after discussion on the mailing list

Changes to the original submission:
- Include all subsystems in the discovery log output

Hannes Reinecke (3):
  nvmet: make the subsystem type configurable
  nvmet: expose discovery subsystems
  nvmet: include all configured port in the discovery log page

 drivers/nvme/target/configfs.c  |  80 ++++++++++++++++++-
 drivers/nvme/target/core.c      |  19 ++++-
 drivers/nvme/target/discovery.c | 133 ++++++++++++++++++++++++++------
 drivers/nvme/target/nvmet.h     |   2 +
 4 files changed, 205 insertions(+), 29 deletions(-)

-- 
2.29.2



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

* [PATCH 1/3] nvmet: make the subsystem type configurable
  2022-04-06 14:22 [PATCHv3 0/3] nvmet: unique discovery subsystem Hannes Reinecke
@ 2022-04-06 14:22 ` Hannes Reinecke
  2022-04-06 14:22 ` [PATCH 2/3] nvmet: expose discovery subsystems Hannes Reinecke
  2022-04-06 14:22 ` [PATCH 3/3] nvmet: include all configured port in the discovery log page Hannes Reinecke
  2 siblings, 0 replies; 6+ messages in thread
From: Hannes Reinecke @ 2022-04-06 14:22 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

Make the subsystem type configurable to allow for unique
discovery subsystems by changing the subsystem type to
'discovery'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/target/configfs.c  | 54 +++++++++++++++++++++++++++++++++
 drivers/nvme/target/discovery.c |  2 +-
 2 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
index e44b2988759e..31d2490264e3 100644
--- a/drivers/nvme/target/configfs.c
+++ b/drivers/nvme/target/configfs.c
@@ -1234,6 +1234,59 @@ static ssize_t nvmet_subsys_attr_model_store(struct config_item *item,
 }
 CONFIGFS_ATTR(nvmet_subsys_, attr_model);
 
+static const struct nvmet_type_name_map nvmet_subsys_type_map[] = {
+	{ NVME_NQN_DISC,	"referral" },
+	{ NVME_NQN_NVME,	"nvme" },
+	{ NVME_NQN_CURR,	"discovery" },
+};
+
+static ssize_t nvmet_subsys_attr_type_show(struct config_item *item,
+						 char *page)
+{
+	u8 type = to_subsys(item)->type;
+	int i;
+
+	for (i = 1; i < ARRAY_SIZE(nvmet_subsys_type_map); i++) {
+		if (nvmet_subsys_type_map[i].type == type)
+			return snprintf(page, PAGE_SIZE, "%s\n",
+					nvmet_subsys_type_map[i].name);
+	}
+
+	return snprintf(page, PAGE_SIZE, "\n");
+}
+
+static ssize_t nvmet_subsys_attr_type_store(struct config_item *item,
+					    const char *page, size_t count)
+{
+	struct nvmet_subsys *subsys = to_subsys(item);
+	int i;
+
+	if (subsys->subsys_discovered)
+		return -EACCES;
+
+	for (i = 0; i < ARRAY_SIZE(nvmet_subsys_type_map); i++) {
+		if (sysfs_streq(page, nvmet_subsys_type_map[i].name))
+			goto found;
+	}
+
+	pr_err("Invalid value '%s' for subsystem type\n", page);
+	return -EINVAL;
+
+found:
+	down_write(&nvmet_config_sem);
+	if (nvmet_subsys_type_map[i].type == NVME_NQN_CURR) {
+		if (!xa_empty(&subsys->namespaces)) {
+			pr_err("discovery subsystem cannot have namespaces\n");
+			return -EINVAL;
+		}
+	}
+	subsys->type = nvmet_subsys_type_map[i].type;
+	up_write(&nvmet_config_sem);
+
+	return count;
+}
+CONFIGFS_ATTR(nvmet_subsys_, attr_type);
+
 #ifdef CONFIG_BLK_DEV_INTEGRITY
 static ssize_t nvmet_subsys_attr_pi_enable_show(struct config_item *item,
 						char *page)
@@ -1263,6 +1316,7 @@ static struct configfs_attribute *nvmet_subsys_attrs[] = {
 	&nvmet_subsys_attr_attr_cntlid_min,
 	&nvmet_subsys_attr_attr_cntlid_max,
 	&nvmet_subsys_attr_attr_model,
+	&nvmet_subsys_attr_attr_type,
 #ifdef CONFIG_BLK_DEV_INTEGRITY
 	&nvmet_subsys_attr_attr_pi_enable,
 #endif
diff --git a/drivers/nvme/target/discovery.c b/drivers/nvme/target/discovery.c
index c2162eef8ce1..b5012df790d5 100644
--- a/drivers/nvme/target/discovery.c
+++ b/drivers/nvme/target/discovery.c
@@ -219,7 +219,7 @@ static void nvmet_execute_disc_get_log_page(struct nvmet_req *req)
 
 		nvmet_format_discovery_entry(hdr, req->port,
 				p->subsys->subsysnqn, traddr,
-				NVME_NQN_NVME, numrec);
+				p->subsys->type, numrec);
 		numrec++;
 	}
 
-- 
2.29.2



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

* [PATCH 2/3] nvmet: expose discovery subsystems
  2022-04-06 14:22 [PATCHv3 0/3] nvmet: unique discovery subsystem Hannes Reinecke
  2022-04-06 14:22 ` [PATCH 1/3] nvmet: make the subsystem type configurable Hannes Reinecke
@ 2022-04-06 14:22 ` Hannes Reinecke
  2022-04-07  9:45   ` Christoph Hellwig
  2022-04-06 14:22 ` [PATCH 3/3] nvmet: include all configured port in the discovery log page Hannes Reinecke
  2 siblings, 1 reply; 6+ messages in thread
From: Hannes Reinecke @ 2022-04-06 14:22 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

Add a module parameter 'expose_discovery_subsys' to allow creation
of discovery subsystems through configfs.
If the option is enabled no default discovery subsystem is created
per default, and the user is required to create one via configfs.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/target/configfs.c  | 26 ++++++++++++--
 drivers/nvme/target/core.c      | 19 ++++++++--
 drivers/nvme/target/discovery.c | 63 ++++++++++++++++++++++++++-------
 drivers/nvme/target/nvmet.h     |  2 ++
 4 files changed, 91 insertions(+), 19 deletions(-)

diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
index 31d2490264e3..1fd4d09e3db4 100644
--- a/drivers/nvme/target/configfs.c
+++ b/drivers/nvme/target/configfs.c
@@ -20,6 +20,16 @@ static const struct config_item_type nvmet_subsys_type;
 static LIST_HEAD(nvmet_ports_list);
 struct list_head *nvmet_ports = &nvmet_ports_list;
 
+static int expose_discovery_subsys;
+module_param(expose_discovery_subsys, int, 0644);
+MODULE_PARM_DESC(expose_discovery_subsys,
+		 "Expose discovery subsytem in configfs");
+
+bool nvmet_expose_discovery_subsys(void)
+{
+	return expose_discovery_subsys;
+}
+
 struct nvmet_type_name_map {
 	u8		type;
 	const char	*name;
@@ -1264,6 +1274,11 @@ static ssize_t nvmet_subsys_attr_type_store(struct config_item *item,
 	if (subsys->subsys_discovered)
 		return -EACCES;
 
+	if (!expose_discovery_subsys) {
+		pr_err("Unique discovery subsystem NQNs are not enabled\n");
+		return -EINVAL;
+	}
+
 	for (i = 0; i < ARRAY_SIZE(nvmet_subsys_type_map); i++) {
 		if (sysfs_streq(page, nvmet_subsys_type_map[i].name))
 			goto found;
@@ -1348,13 +1363,18 @@ static struct config_group *nvmet_subsys_make(struct config_group *group,
 		const char *name)
 {
 	struct nvmet_subsys *subsys;
+	enum nvme_subsys_type subsys_type = NVME_NQN_NVME;
 
 	if (sysfs_streq(name, NVME_DISC_SUBSYS_NAME)) {
-		pr_err("can't create discovery subsystem through configfs\n");
-		return ERR_PTR(-EINVAL);
+		if (expose_discovery_subsys)
+			subsys_type = NVME_NQN_CURR;
+		else {
+			pr_err("can't create discovery subsystem through configfs\n");
+			return ERR_PTR(-EINVAL);
+		}
 	}
 
-	subsys = nvmet_subsys_alloc(name, NVME_NQN_NVME);
+	subsys = nvmet_subsys_alloc(name, subsys_type);
 	if (IS_ERR(subsys))
 		return ERR_CAST(subsys);
 
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 90e75324dae0..2187af97c47e 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -1491,14 +1491,19 @@ static struct nvmet_subsys *nvmet_find_get_subsys(struct nvmet_port *port,
 		const char *subsysnqn)
 {
 	struct nvmet_subsys_link *p;
+	enum nvme_subsys_type subsys_type = NVME_NQN_NVME;
 
 	if (!port)
 		return NULL;
 
 	if (!strcmp(NVME_DISC_SUBSYS_NAME, subsysnqn)) {
-		if (!kref_get_unless_zero(&nvmet_disc_subsys->ref))
-			return NULL;
-		return nvmet_disc_subsys;
+		if (nvmet_expose_discovery_subsys())
+			subsys_type = NVME_NQN_CURR;
+		else {
+			if (!kref_get_unless_zero(&nvmet_disc_subsys->ref))
+				return NULL;
+			return nvmet_disc_subsys;
+		}
 	}
 
 	down_read(&nvmet_config_sem);
@@ -1510,6 +1515,13 @@ static struct nvmet_subsys *nvmet_find_get_subsys(struct nvmet_port *port,
 			up_read(&nvmet_config_sem);
 			return p->subsys;
 		}
+		if (subsys_type == NVME_NQN_CURR &&
+		    p->subsys->type == subsys_type) {
+			if (!kref_get_unless_zero(&p->subsys->ref))
+				break;
+			up_read(&nvmet_config_sem);
+			return p->subsys;
+		}
 	}
 	up_read(&nvmet_config_sem);
 	return NULL;
@@ -1544,6 +1556,7 @@ struct nvmet_subsys *nvmet_subsys_alloc(const char *subsysnqn,
 	case NVME_NQN_DISC:
 	case NVME_NQN_CURR:
 		subsys->max_qid = 0;
+		subsys->allow_any_host = 1;
 		break;
 	default:
 		pr_err("%s: Unknown Subsystem type - %d\n", __func__, type);
diff --git a/drivers/nvme/target/discovery.c b/drivers/nvme/target/discovery.c
index b5012df790d5..13fda8f9d60c 100644
--- a/drivers/nvme/target/discovery.c
+++ b/drivers/nvme/target/discovery.c
@@ -29,18 +29,32 @@ void nvmet_port_disc_changed(struct nvmet_port *port,
 			     struct nvmet_subsys *subsys)
 {
 	struct nvmet_ctrl *ctrl;
+	struct nvmet_subsys *disc_subsys = nvmet_disc_subsys;
 
 	lockdep_assert_held(&nvmet_config_sem);
 	nvmet_genctr++;
 
-	mutex_lock(&nvmet_disc_subsys->lock);
-	list_for_each_entry(ctrl, &nvmet_disc_subsys->ctrls, subsys_entry) {
+	if (nvmet_expose_discovery_subsys()) {
+		struct nvmet_subsys_link *s;
+
+		disc_subsys = NULL;
+		list_for_each_entry(s, &port->subsystems, entry) {
+			if (s->subsys->type == NVME_NQN_CURR) {
+				disc_subsys = s->subsys;
+				break;
+			}
+		}
+		if (!disc_subsys)
+			return;
+	}
+	mutex_lock(&disc_subsys->lock);
+	list_for_each_entry(ctrl, &disc_subsys->ctrls, subsys_entry) {
 		if (subsys && !nvmet_host_allowed(subsys, ctrl->hostnqn))
 			continue;
 
 		__nvmet_disc_changed(port, ctrl);
 	}
-	mutex_unlock(&nvmet_disc_subsys->lock);
+	mutex_unlock(&disc_subsys->lock);
 
 	/* If transport can signal change, notify transport */
 	if (port->tr_ops && port->tr_ops->discovery_chg)
@@ -48,19 +62,33 @@ void nvmet_port_disc_changed(struct nvmet_port *port,
 }
 
 static void __nvmet_subsys_disc_changed(struct nvmet_port *port,
-					struct nvmet_subsys *subsys,
 					struct nvmet_host *host)
 {
 	struct nvmet_ctrl *ctrl;
+	struct nvmet_subsys *disc_subsys = nvmet_disc_subsys;
+
+	if (nvmet_expose_discovery_subsys()) {
+		struct nvmet_subsys_link *s;
+
+		disc_subsys = NULL;
+		list_for_each_entry(s, &port->subsystems, entry) {
+			if (s->subsys->type == NVME_NQN_CURR) {
+				disc_subsys = s->subsys;
+				break;
+			}
+		}
+		if (!disc_subsys)
+			return;
+	}
 
-	mutex_lock(&nvmet_disc_subsys->lock);
-	list_for_each_entry(ctrl, &nvmet_disc_subsys->ctrls, subsys_entry) {
+	mutex_lock(&disc_subsys->lock);
+	list_for_each_entry(ctrl, &disc_subsys->ctrls, subsys_entry) {
 		if (host && strcmp(nvmet_host_name(host), ctrl->hostnqn))
 			continue;
 
 		__nvmet_disc_changed(port, ctrl);
 	}
-	mutex_unlock(&nvmet_disc_subsys->lock);
+	mutex_unlock(&disc_subsys->lock);
 }
 
 void nvmet_subsys_disc_changed(struct nvmet_subsys *subsys,
@@ -76,7 +104,7 @@ void nvmet_subsys_disc_changed(struct nvmet_subsys *subsys,
 		list_for_each_entry(s, &port->subsystems, entry) {
 			if (s->subsys != subsys)
 				continue;
-			__nvmet_subsys_disc_changed(port, subsys, host);
+			__nvmet_subsys_disc_changed(port, host);
 		}
 }
 
@@ -146,7 +174,10 @@ static size_t discovery_log_entries(struct nvmet_req *req)
 	struct nvmet_ctrl *ctrl = req->sq->ctrl;
 	struct nvmet_subsys_link *p;
 	struct nvmet_port *r;
-	size_t entries = 1;
+	size_t entries = 0;
+
+	if (!nvmet_expose_discovery_subsys())
+		entries++;
 
 	list_for_each_entry(p, &req->port->subsystems, entry) {
 		if (!nvmet_host_allowed(p->subsys, ctrl->hostnqn))
@@ -208,10 +239,12 @@ static void nvmet_execute_disc_get_log_page(struct nvmet_req *req)
 
 	nvmet_set_disc_traddr(req, req->port, traddr);
 
-	nvmet_format_discovery_entry(hdr, req->port,
-				     nvmet_disc_subsys->subsysnqn,
-				     traddr, NVME_NQN_CURR, numrec);
-	numrec++;
+	if (!nvmet_expose_discovery_subsys()) {
+		nvmet_format_discovery_entry(hdr, req->port,
+				nvmet_disc_subsys->subsysnqn,
+				traddr, NVME_NQN_CURR, numrec);
+		numrec++;
+	}
 
 	list_for_each_entry(p, &req->port->subsystems, entry) {
 		if (!nvmet_host_allowed(p->subsys, ctrl->hostnqn))
@@ -393,6 +426,8 @@ u16 nvmet_parse_discovery_cmd(struct nvmet_req *req)
 
 int __init nvmet_init_discovery(void)
 {
+	if (nvmet_expose_discovery_subsys())
+		return 0;
 	nvmet_disc_subsys =
 		nvmet_subsys_alloc(NVME_DISC_SUBSYS_NAME, NVME_NQN_CURR);
 	return PTR_ERR_OR_ZERO(nvmet_disc_subsys);
@@ -400,5 +435,7 @@ int __init nvmet_init_discovery(void)
 
 void nvmet_exit_discovery(void)
 {
+	if (nvmet_expose_discovery_subsys())
+		return;
 	nvmet_subsys_put(nvmet_disc_subsys);
 }
diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h
index 69818752a33a..4d51d5d95ffb 100644
--- a/drivers/nvme/target/nvmet.h
+++ b/drivers/nvme/target/nvmet.h
@@ -532,6 +532,8 @@ extern u32 nvmet_ana_group_enabled[NVMET_MAX_ANAGRPS + 1];
 extern u64 nvmet_ana_chgcnt;
 extern struct rw_semaphore nvmet_ana_sem;
 
+bool nvmet_expose_discovery_subsys(void);
+
 bool nvmet_host_allowed(struct nvmet_subsys *subsys, const char *hostnqn);
 
 int nvmet_bdev_ns_enable(struct nvmet_ns *ns);
-- 
2.29.2



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

* [PATCH 3/3] nvmet: include all configured port in the discovery log page
  2022-04-06 14:22 [PATCHv3 0/3] nvmet: unique discovery subsystem Hannes Reinecke
  2022-04-06 14:22 ` [PATCH 1/3] nvmet: make the subsystem type configurable Hannes Reinecke
  2022-04-06 14:22 ` [PATCH 2/3] nvmet: expose discovery subsystems Hannes Reinecke
@ 2022-04-06 14:22 ` Hannes Reinecke
  2 siblings, 0 replies; 6+ messages in thread
From: Hannes Reinecke @ 2022-04-06 14:22 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

When exposed discovery subsystems are enabled we should include
all configured ports in the discovery log page, not just those
through which the controller was connected.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/target/discovery.c | 72 ++++++++++++++++++++++++++++-----
 1 file changed, 61 insertions(+), 11 deletions(-)

diff --git a/drivers/nvme/target/discovery.c b/drivers/nvme/target/discovery.c
index 13fda8f9d60c..d23353a750dd 100644
--- a/drivers/nvme/target/discovery.c
+++ b/drivers/nvme/target/discovery.c
@@ -172,6 +172,7 @@ static void nvmet_set_disc_traddr(struct nvmet_req *req, struct nvmet_port *port
 static size_t discovery_log_entries(struct nvmet_req *req)
 {
 	struct nvmet_ctrl *ctrl = req->sq->ctrl;
+	struct nvmet_subsys *disc_subsys = ctrl->subsys;
 	struct nvmet_subsys_link *p;
 	struct nvmet_port *r;
 	size_t entries = 0;
@@ -179,10 +180,27 @@ static size_t discovery_log_entries(struct nvmet_req *req)
 	if (!nvmet_expose_discovery_subsys())
 		entries++;
 
-	list_for_each_entry(p, &req->port->subsystems, entry) {
-		if (!nvmet_host_allowed(p->subsys, ctrl->hostnqn))
-			continue;
-		entries++;
+	list_for_each_entry(r, nvmet_ports, global_entry) {
+		if (!nvmet_expose_discovery_subsys()) {
+			if (r != req->port)
+				continue;
+		} else {
+			bool linked = false;
+
+			list_for_each_entry(p, &r->subsystems, entry) {
+				if (p->subsys == disc_subsys) {
+					linked = true;
+					break;
+				}
+			}
+			if (!linked)
+				continue;
+		}
+		list_for_each_entry(p, &r->subsystems, entry) {
+			if (!nvmet_host_allowed(p->subsys, ctrl->hostnqn))
+				continue;
+			entries++;
+		}
 	}
 	list_for_each_entry(r, &req->port->referrals, entry)
 		entries++;
@@ -193,6 +211,7 @@ static void nvmet_execute_disc_get_log_page(struct nvmet_req *req)
 {
 	const int entry_size = sizeof(struct nvmf_disc_rsp_page_entry);
 	struct nvmet_ctrl *ctrl = req->sq->ctrl;
+	struct nvmet_subsys *disc_subsys = ctrl->subsys;
 	struct nvmf_disc_rsp_page_hdr *hdr;
 	u64 offset = nvmet_get_log_page_offset(req->cmd);
 	size_t data_len = nvmet_get_log_page_len(req->cmd);
@@ -246,14 +265,45 @@ static void nvmet_execute_disc_get_log_page(struct nvmet_req *req)
 		numrec++;
 	}
 
-	list_for_each_entry(p, &req->port->subsystems, entry) {
-		if (!nvmet_host_allowed(p->subsys, ctrl->hostnqn))
-			continue;
+	list_for_each_entry(r, nvmet_ports, global_entry) {
+		nvmet_set_disc_traddr(req, r, traddr);
+
+		if (!nvmet_expose_discovery_subsys()) {
+			/*
+			 * If the discovery subsystem is not exposed fall
+			 * back to the original design of only presenting
+			 * information about the port to which the controller
+			 * is connected.
+			 */
+			if (r != req->port)
+				continue;
+		} else {
+			bool linked = false;
+
+			/*
+			 * If the discovery subsystem is exposed present
+			 * information about all ports into which the
+			 * discovery subsystem is linked.
+			 */
+			list_for_each_entry(p, &r->subsystems, entry) {
+				if (p->subsys == disc_subsys) {
+					linked = true;
+					break;
+				}
+			}
+			if (!linked)
+				continue;
+		}
 
-		nvmet_format_discovery_entry(hdr, req->port,
-				p->subsys->subsysnqn, traddr,
-				p->subsys->type, numrec);
-		numrec++;
+		list_for_each_entry(p, &r->subsystems, entry) {
+			if (!nvmet_host_allowed(p->subsys, ctrl->hostnqn))
+				continue;
+
+			nvmet_format_discovery_entry(hdr, r,
+					p->subsys->subsysnqn, traddr,
+					p->subsys->type, numrec);
+			numrec++;
+		}
 	}
 
 	list_for_each_entry(r, &req->port->referrals, entry) {
-- 
2.29.2



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

* Re: [PATCH 2/3] nvmet: expose discovery subsystems
  2022-04-06 14:22 ` [PATCH 2/3] nvmet: expose discovery subsystems Hannes Reinecke
@ 2022-04-07  9:45   ` Christoph Hellwig
  2022-04-07 10:13     ` Hannes Reinecke
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2022-04-07  9:45 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: Christoph Hellwig, Sagi Grimberg, Keith Busch, linux-nvme

On Wed, Apr 06, 2022 at 04:22:09PM +0200, Hannes Reinecke wrote:
> Add a module parameter 'expose_discovery_subsys' to allow creation
> of discovery subsystems through configfs.
> If the option is enabled no default discovery subsystem is created
> per default, and the user is required to create one via configfs.

I'm not fan of module parameters.  Can we do this using configfs on a
per-port basis?


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

* Re: [PATCH 2/3] nvmet: expose discovery subsystems
  2022-04-07  9:45   ` Christoph Hellwig
@ 2022-04-07 10:13     ` Hannes Reinecke
  0 siblings, 0 replies; 6+ messages in thread
From: Hannes Reinecke @ 2022-04-07 10:13 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme

On 4/7/22 11:45, Christoph Hellwig wrote:
> On Wed, Apr 06, 2022 at 04:22:09PM +0200, Hannes Reinecke wrote:
>> Add a module parameter 'expose_discovery_subsys' to allow creation
>> of discovery subsystems through configfs.
>> If the option is enabled no default discovery subsystem is created
>> per default, and the user is required to create one via configfs.
> 
> I'm not fan of module parameters.  Can we do this using configfs on a
> per-port basis?

configfs: yes.
per-port: we could, but then we cannot configure the default discovery 
subsystem. But we can't do that anyway. I'll give it a shot.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer


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

end of thread, other threads:[~2022-04-07 10:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 14:22 [PATCHv3 0/3] nvmet: unique discovery subsystem Hannes Reinecke
2022-04-06 14:22 ` [PATCH 1/3] nvmet: make the subsystem type configurable Hannes Reinecke
2022-04-06 14:22 ` [PATCH 2/3] nvmet: expose discovery subsystems Hannes Reinecke
2022-04-07  9:45   ` Christoph Hellwig
2022-04-07 10:13     ` Hannes Reinecke
2022-04-06 14:22 ` [PATCH 3/3] nvmet: include all configured port in the discovery log page Hannes Reinecke

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.