From: james_p_freyensee@linux.intel.com (Jay Freyensee)
Subject: [PATCH v1 3/3] nvme-cli: fix nvme-connect-all using hostnqn
Date: Fri, 21 Oct 2016 08:50:05 -0700 [thread overview]
Message-ID: <1477065005-10635-4-git-send-email-james_p_freyensee@linux.intel.com> (raw)
In-Reply-To: <1477065005-10635-1-git-send-email-james_p_freyensee@linux.intel.com>
The example in the man pages:
nvme connect-all --transport=rdma --traddr=192.168.1.3 \
--hostnqn=host1-rogue-nqn
fails because nvme-cli fails to actually use hostnqn upon
connect. This patch fixes that.
Signed-off-by: Jay Freyensee <james_p_freyensee at linux.intel.com>
---
fabrics.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fabrics.c b/fabrics.c
index 51e424e..ab2e477 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -540,6 +540,13 @@ static int connect_ctrl(struct nvmf_disc_rsp_page_entry *e)
return -EINVAL;
p += len;
+ if (cfg.hostnqn) {
+ len = sprintf(p, ",hostnqn=%s", cfg.hostnqn);
+ if (len < 0)
+ return -EINVAL;
+ p += len;
+ }
+
switch (e->trtype) {
case NVMF_TRTYPE_LOOP: /* loop */
len = sprintf(p, ",transport=loop");
--
2.5.5
next prev parent reply other threads:[~2016-10-21 15:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-21 15:50 [PATCH v1 0/3] nvme-cli: fabric doc and tool fixes Jay Freyensee
2016-10-21 15:50 ` [PATCH v1 1/3] nvme-cli: follow-on discovery tweaks from thread Jay Freyensee
2016-10-21 22:21 ` Sagi Grimberg
2016-10-21 15:50 ` [PATCH v1 2/3] nvme-cli: follow-on doc tweaks to nvme-connect-all Jay Freyensee
2016-10-21 22:21 ` Sagi Grimberg
2016-10-21 15:50 ` Jay Freyensee [this message]
2016-10-21 22:22 ` [PATCH v1 3/3] nvme-cli: fix nvme-connect-all using hostnqn Sagi Grimberg
2016-10-21 16:37 ` [PATCH v1 0/3] nvme-cli: fabric doc and tool fixes Keith Busch
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=1477065005-10635-4-git-send-email-james_p_freyensee@linux.intel.com \
--to=james_p_freyensee@linux.intel.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.