linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: james_p_freyensee@linux.intel.com (J Freyensee)
Subject: [PATCH v2] nvme-cli: user-defined hostnqn option for discover
Date: Tue, 02 Aug 2016 16:31:27 -0700	[thread overview]
Message-ID: <1470180687.3928.40.camel@linux.intel.com> (raw)
In-Reply-To: <7561e238-9063-ceec-2b47-47ffd3607a42@grimberg.me>

On Tue, 2016-08-02@09:48 +0300, Sagi Grimberg wrote:
> > > Any chance you could also send a patch that reads
> > > /etc/nvme/hostnqn
> > > for a default hostnqn so that we can have a persistent one?
> > 
> > I'm a tad unclear what is the request? The default hostnqn is
> > buried
> > inside /dev/nvme-fabrics.  You want nvme-cli to read out the
> > default
> > hostnqn from /dev/nvme-fabrics and place it in  /etc/nvme/hostnqn?
> 
> I think Christoph is requesting that when the user doesn't pass a
> hostnqn, nvme-cli will try to read it from a file located in
> /etc/nvme/hostnqn (and if this doesn't exist then go ahead without
> it). This way, the host can have a persistent hostnqn across reboots
> (the driver generates one on module init time).

hmmm...the scenario I set up that found this issue, the host generates
a default hostnqn in the nvme-fabrics driver at init().  And if there
is no --hostnqn flag passed, the /dev/nvme-fabrics driver will use the
default generated by the nvme-fabrics driver at init().  And no
/etc/nvme/hostnqn file gets created or exists currently.

So is the request to have nvme-cli use whatever is in /etc/nvme/hostnqn
 (if it exists) over the default in the nvme-fabrics driver?  So
preference of hostnqn input would be:

1. --hostnqn flag
2. /etc/nvme/hostnqn
3. default hostnqn generated by nvme-fabrics driver (ex: nqn.2014
-08.org.nvmexpress:NVMf:uuid:a2d7752c-a31b-477a-a003-31a5e1c424a9)

(note 2. may contain a hostnqn different from the default)

??

      reply	other threads:[~2016-08-02 23:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-29 20:38 [PATCH v2] *** Discovery feature fix in nvme-cli *** Jay Freyensee
2016-07-29 20:38 ` [PATCH v2] nvme-cli: user-defined hostnqn option for discover Jay Freyensee
2016-08-01 11:18   ` Christoph Hellwig
2016-08-01 21:32     ` J Freyensee
2016-08-02  6:48       ` Sagi Grimberg
2016-08-02 23:31         ` J Freyensee [this message]

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=1470180687.3928.40.camel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).