On Wed, Feb 19, 2020 at 9:56 AM Jeff Moyer <[email protected]> wrote:
>
> Dan Williams <[email protected]> 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.
_______________________________________________
Linux-nvdimm mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to