All of lore.kernel.org
 help / color / mirror / Atom feed
From: james_p_freyensee@linux.intel.com (J Freyensee)
Subject: [PATCH v2 nvme-cli 3/4] fabrics: Allow discover params to come from a conf file
Date: Mon, 08 Aug 2016 14:29:15 -0700	[thread overview]
Message-ID: <1470691755.4368.26.camel@linux.intel.com> (raw)
In-Reply-To: <20160808133502.GB19826@lst.de>

On Mon, 2016-08-08@15:35 +0200, Christoph Hellwig wrote:
> On Mon, Aug 08, 2016@02:57:59PM +0300, Sagi Grimberg wrote:
> > 
> > Allow the user to just run "nvme discover" or "nvme connect-all"
> > in case it finds a default /etc/nvme/nvmf_disc conf file.
> 
> Hmm, can just call this /etc/nvme/discovery.conf or something else
> that rolls easier off the hand?

Yah, similar to my last nitpick comment, I like this a tad better
because we don't even have to mention nvmf/nvmeof.

I'd still like to see example documentation in the header patch of what
the resulting .conf file contents could look like.

> 
> > 
> > +static int discover_from_conf_file(const char *desc, char *argstr,
> > +	const struct argconfig_commandline_options *opts, bool
> > connect)
> 
> Second tab for the argument indent please.
> 
> > 
> > +		err = build_options(argstr, BUF_SIZE);
> > +		if (err) {
> > +			ret = err;
> > +			continue;
> > +		}
> > +
> > +		err = do_discover(argstr, connect);
> > +		if (err) {
> > +			ret = err;
> > +			continue;
> > +		}
> 
> How will diagnostics look like here if the file has incorrect
> syntax?

Dido. ?Be nice to know what argstr/parameter broke.


> 
> > 
> > +	if (!cfg.transport && !cfg.traddr) {
> > +		return discover_from_conf_file(desc, argstr,
> > +				command_line_options, connect);
> 
> Maybe we want a separate options that says the option needs to be
> read from a config file, e.g. --file with an optional argument
> for the file name?

Are you thinking that there could be a single system that is acting
like multiple hosts, therefore each "host/hostnqn" could use a separate
.conf file for connection??

If that is the case, then it may be a little confusing if there was a
single /etc/nvme/hostnqn filename that existed.

  reply	other threads:[~2016-08-08 21:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 11:57 [PATCH v2 nvme-cli 0/4] Useful fabrics patches Sagi Grimberg
2016-08-08 11:57 ` [PATCH v2 nvme-cli 1/4] fabrics: Allow ipv6 address resolution Sagi Grimberg
2016-08-08 21:17   ` J Freyensee
2016-08-08 11:57 ` [PATCH v2 nvme-cli 2/4] fabrics: stringify discover output Sagi Grimberg
2016-08-08 13:31   ` Christoph Hellwig
2016-08-08 11:57 ` [PATCH v2 nvme-cli 3/4] fabrics: Allow discover params to come from a conf file Sagi Grimberg
2016-08-08 13:35   ` Christoph Hellwig
2016-08-08 21:29     ` J Freyensee [this message]
2016-08-09  6:52     ` Sagi Grimberg
2016-08-08 21:51   ` J Freyensee
2016-08-09  6:58     ` Sagi Grimberg
2016-08-08 11:58 ` [PATCH v2 nvme-cli 4/4] fabrics: Take the hostnqn parameter from a conf file if not given Sagi Grimberg
2016-08-08 13:36   ` Christoph Hellwig
2016-08-08 21:37     ` J Freyensee
2016-08-08 15:36 ` [PATCH v2 nvme-cli 0/4] Useful fabrics patches 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=1470691755.4368.26.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 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.