All of lore.kernel.org
 help / color / mirror / Atom feed
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH RFC nvme-cli 4/4] fabrics: Allow discover params to come from a conf file
Date: Mon, 8 Aug 2016 11:45:16 +0300	[thread overview]
Message-ID: <a65d2044-2e70-6612-0645-5bb1fa2ed65c@grimberg.me> (raw)
In-Reply-To: <20160808070342.GD12598@lst.de>


>> Allow the user to just run "nvme discover" or "nvme connect-all"
>> in case it finds a default /etc/nvme/nvmf_disc conf file.
>>
>> We allow multiple discovery addresses by iterating over the
>> lines of the file and executing a discover (with or without
>> connect) for each line. We allow newlines and '#' prefixed comments.
>>
>> The return value is or'ed on all discover attempts.
>>
>> In order to minimize some parsing code, I just convert the
>> file line into an (argc, argv) pair and feed it to argconfig_parse()
>> which dictates that the file lines are identical to what one would
>> pass nvme discover <params>. I'm open to better ideas.
>>
>> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
>> ---
>> Not sure if anyone will find this useful, but worth a
>> shot.
>
> Looks ok to me.

I'll settle for ok :)

> While the options are an odd config file format
> having them the same as the command line at least makes it easy
> to document both in one spot.

It was the easiest for me in terms of parsing (or non-parsing to
be exact).

  reply	other threads:[~2016-08-08  8:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-07 12:19 [PATCH nvme-cli 0/4] Some useful fabrics patches Sagi Grimberg
2016-08-07 12:19 ` [PATCH nvme-cli 1/4] fabrics: Allow ipv6 address resolution Sagi Grimberg
2016-08-08  6:55   ` Christoph Hellwig
2016-08-08 20:53     ` J Freyensee
2016-08-07 12:19 ` [PATCH nvme-cli 2/4] fabrics: stringify discover output Sagi Grimberg
2016-08-08  6:59   ` Christoph Hellwig
2016-08-08  8:41     ` Sagi Grimberg
2016-08-07 12:19 ` [PATCH nvme-cli 3/4] fabrics: Remove redundant build_options Sagi Grimberg
2016-08-08  7:01   ` Christoph Hellwig
2016-08-08  8:41     ` Sagi Grimberg
2016-08-07 12:19 ` [PATCH RFC nvme-cli 4/4] fabrics: Allow discover params to come from a conf file Sagi Grimberg
2016-08-08  7:03   ` Christoph Hellwig
2016-08-08  8:45     ` Sagi Grimberg [this message]
2016-08-08 21:13   ` J Freyensee

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=a65d2044-2e70-6612-0645-5bb1fa2ed65c@grimberg.me \
    --to=sagi@grimberg.me \
    /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.