linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: linux-nvdimm <linux-nvdimm@lists.01.org>
Subject: Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing
Date: Wed, 19 Feb 2020 10:53:41 -0800	[thread overview]
Message-ID: <CAPcyv4hHU+RC6TZW94UrjFJZ1fsOU8Nug0GP+Mb5mBGW8qk+UQ@mail.gmail.com> (raw)
In-Reply-To: <x49k14ila4r.fsf@segfault.boston.devel.redhat.com>

On Wed, Feb 19, 2020 at 10:12 AM Jeff Moyer <jmoyer@redhat.com> wrote:
>
> Dan Williams <dan.j.williams@intel.com> writes:
>
> > On Wed, Feb 19, 2020 at 9:56 AM Jeff Moyer <jmoyer@redhat.com> wrote:
> >>
> >> Dan Williams <dan.j.williams@intel.com> writes:
> >>
> >> > The only expected difference between "ndctl list -R" and "ndctl list
> >> > -Rv" is some additional output fields. Instead it currently results in
> >> > the region array being contained in a named "regions" list object.
> >> >
> >> > # ndctl list -R -r 0
> >> > [
> >> >   {
> >> >     "dev":"region0",
> >> >     "size":4294967296,
> >> >     "available_size":0,
> >> >     "max_available_extent":0,
> >> >     "type":"pmem",
> >> >     "persistence_domain":"unknown"
> >> >   }
> >> > ]
> >> >
> >> > # ndctl list -Rv -r 0
> >> > {
> >> >   "regions":[
> >> >     {
> >> >       "dev":"region0",
> >> >       "size":4294967296,
> >> >       "available_size":0,
> >> >       "max_available_extent":0,
> >> >       "type":"pmem",
> >> >       "numa_node":0,
> >> >       "target_node":2,
> >> >       "persistence_domain":"unknown",
> >> >       "namespaces":[
> >> >         {
> >> >           "dev":"namespace0.0",
> >> >           "mode":"fsdax",
> >> >           "map":"mem",
> >> >           "size":4294967296,
> >> >           "sector_size":512,
> >> >           "blockdev":"pmem0",
> >> >           "numa_node":0,
> >> >           "target_node":2
> >> >         }
> >> >       ]
> >> >     }
> >> >   ]
> >> > }
> >> >
> >> > Drop the named list, by not including namespaces in the listing. Extra
> >> > objects only appear at the -vv level. "ndctl list -v" and "ndctl list
> >> > -Nv" are synonyms and behave as expected.
> >> >
> >> > # ndctl list -Rv -r 0
> >> > [
> >> >   {
> >> >     "dev":"region0",
> >> >     "size":4294967296,
> >> >     "available_size":0,
> >> >     "max_available_extent":0,
> >> >     "type":"pmem",
> >> >     "numa_node":0,
> >> >     "target_node":2,
> >> >     "persistence_domain":"unknown"
> >> >   }
> >> > ]
> >> >
> >>
> >> Will this break existing code that parses the javascript output?
> >
> > Always a potential for that. That said, I'd rather attempt to make it
> > symmetric and replace it if someone screams, rather than let this
> > quirk persist because it makes it impossible to ingest region data
> > with the same script across -R and -Rv.
>
> Yeah, I see where you're coming from.  However, script authors will
> still have to deal with older versions of ndctl in the wild (for many
> years).  If the decision was up to me, I'd live with the wart in favor
> of not breaking scripts when ndctl gets updated.  Users hate that.

Let's do a compromise, because users also hate nonsensical legacy that
they can't avoid. How about an environment variable,
"NDCTL_LIST_LINT", that users can set to opt into the latest /
cleanest output format with the understanding that the clean up may
regress scripts that were dependent on the old bugs.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

  reply	other threads:[~2020-02-19 18:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27  0:42 [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing Dan Williams
2020-02-19 17:55 ` Jeff Moyer
2020-02-19 18:01   ` Dan Williams
2020-02-19 18:12     ` Jeff Moyer
2020-02-19 18:53       ` Dan Williams [this message]
2020-02-19 19:10         ` Jeff Moyer
2020-02-19 20:01         ` Verma, Vishal L
2020-02-19 20:09           ` Dan Williams
2020-02-19 20:28             ` Verma, Vishal L
2020-02-21 10:21               ` qi.fuli
2020-03-01  0:53                 ` Dan Williams

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=CAPcyv4hHU+RC6TZW94UrjFJZ1fsOU8Nug0GP+Mb5mBGW8qk+UQ@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-nvdimm@lists.01.org \
    /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).