All of lore.kernel.org
 help / color / mirror / Atom feed
From: jsmart2021@gmail.com (James Smart)
Subject: [PATCH v2 1/7] nvme: remove unnecessary controller subnqn validation
Date: Fri, 11 May 2018 17:50:22 -0700	[thread overview]
Message-ID: <20180512005028.29661-2-jsmart2021@gmail.com> (raw)
In-Reply-To: <20180512005028.29661-1-jsmart2021@gmail.com>

After creating the nvme controller, nvmf_create_ctrl() validates
the newly created subsysnqn vs the one specified by the options.

In general, this is an unnecessary check as the Connect message
should implicitly ensure this value matches.

With the change to the FC transport to do an asynchronous connect
for the first association create, the transport will return to
nvmf_create_ctrl() before that first association has been established,
thus the subnqn will not yet be set.

Remove the unnecessary validation.

Signed-off-by: James Smart <james.smart at broadcom.com>
Reviewed-by: Hannes Reinecke <hare at suse.com>
---
 drivers/nvme/host/fabrics.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 7ae732a77fe8..6fdf499d16b4 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -983,16 +983,6 @@ nvmf_create_ctrl(struct device *dev, const char *buf, size_t count)
 		goto out_module_put;
 	}
 
-	if (strcmp(ctrl->subsys->subnqn, opts->subsysnqn)) {
-		dev_warn(ctrl->device,
-			"controller returned incorrect NQN: \"%s\".\n",
-			ctrl->subsys->subnqn);
-		module_put(ops->module);
-		up_read(&nvmf_transports_rwsem);
-		nvme_delete_ctrl_sync(ctrl);
-		return ERR_PTR(-EINVAL);
-	}
-
 	module_put(ops->module);
 	up_read(&nvmf_transports_rwsem);
 	return ctrl;
-- 
2.13.1

  reply	other threads:[~2018-05-12  0:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-12  0:50 [PATCH v2 0/7] nvme_fc: asynchronous controller create and simple discovery James Smart
2018-05-12  0:50 ` James Smart [this message]
2018-05-12 13:36   ` [PATCH v2 1/7] nvme: remove unnecessary controller subnqn validation Christoph Hellwig
2018-05-25  9:11   ` Christoph Hellwig
2018-05-12  0:50 ` [PATCH v2 2/7] nvme: revise nvme_set_queue_count to return error on some nvme status codes James Smart
2018-05-12 13:34   ` Christoph Hellwig
2018-05-14 15:08     ` James Smart
2018-05-12  0:50 ` [PATCH v2 3/7] nvme_fc: remove setting DNR on exception conditions James Smart
2018-05-25  9:11   ` Christoph Hellwig
2018-05-12  0:50 ` [PATCH v2 4/7] nvme_fc: remove reinit_request routine James Smart
2018-05-12 13:35   ` Christoph Hellwig
2018-05-12  0:50 ` [PATCH v2 5/7] nvme_fc: change controllers first connect to use reconnect path James Smart
2018-05-12  0:50 ` [PATCH v2 6/7] nvme_fc: fix nulling of queue data on reconnect James Smart
2018-05-12  0:50 ` [PATCH v2 7/7] nvme_fc: add 'nvme_discovery' sysfs attribute to fc transport device James Smart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180512005028.29661-2-jsmart2021@gmail.com \
    --to=jsmart2021@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.