linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
* [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing
@ 2019-11-27  0:42 Dan Williams
  2020-02-19 17:55 ` Jeff Moyer
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Williams @ 2019-11-27  0:42 UTC (permalink / raw)
  To: linux-nvdimm

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"
  }
]

Another side effect of this change is that it allows for:

    ndctl list -Rvvv

...to only show the verbose region details vs assuming that namespaces
and dimms etc also need to be added.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 Documentation/ndctl/ndctl-list.txt |   46 ++++++++++++++++++++++++++++++++++++
 ndctl/list.c                       |   10 +++++---
 2 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/Documentation/ndctl/ndctl-list.txt b/Documentation/ndctl/ndctl-list.txt
index f9c7434d3b0b..75fd11876395 100644
--- a/Documentation/ndctl/ndctl-list.txt
+++ b/Documentation/ndctl/ndctl-list.txt
@@ -234,6 +234,52 @@ include::xable-bus-options.txt[]
 	- *-vvv*
 	  Everything '-vv' provides, plus --health, --capabilities,
 	  --idle, and --firmware.
+::
+	The verbosity can also be scoped by the object type. For example
+	to just list regions with capabilities and media error info.
+----
+# ndctl list -Ru -vvv -r 0
+{
+  "dev":"region0",
+  "size":"4.00 GiB (4.29 GB)",
+  "available_size":0,
+  "max_available_extent":0,
+  "type":"pmem",
+  "numa_node":0,
+  "target_node":2,
+  "capabilities":[
+    {
+      "mode":"sector",
+      "sector_sizes":[
+        512,
+        520,
+        528,
+        4096,
+        4104,
+        4160,
+        4224
+      ]
+    },
+    {
+      "mode":"fsdax",
+      "alignments":[
+        4096,
+        2097152,
+        1073741824
+      ]
+    },
+    {
+      "mode":"devdax",
+      "alignments":[
+        4096,
+        2097152,
+        1073741824
+      ]
+    }
+  ],
+  "persistence_domain":"unknown"
+}
+----
 
 include::human-option.txt[]
 
diff --git a/ndctl/list.c b/ndctl/list.c
index 607996a85784..125a9fe34cb8 100644
--- a/ndctl/list.c
+++ b/ndctl/list.c
@@ -507,12 +507,14 @@ int cmd_list(int argc, const char **argv, struct ndctl_ctx *ctx)
 		list.health = true;
 		list.capabilities = true;
 	case 2:
-		list.dimms = true;
-		list.buses = true;
-		list.regions = true;
+		if (num_list_flags() == 0) {
+			list.dimms = true;
+			list.buses = true;
+			list.regions = true;
+			list.namespaces = true;
+		}
 	case 1:
 		list.media_errors = true;
-		list.namespaces = true;
 		list.dax = true;
 	case 0:
 		break;
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing
  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
  0 siblings, 1 reply; 11+ messages in thread
From: Jeff Moyer @ 2020-02-19 17:55 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-nvdimm

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?

-Jeff
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing
  2020-02-19 17:55 ` Jeff Moyer
@ 2020-02-19 18:01   ` Dan Williams
  2020-02-19 18:12     ` Jeff Moyer
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Williams @ 2020-02-19 18:01 UTC (permalink / raw)
  To: Jeff Moyer; +Cc: linux-nvdimm

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.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing
  2020-02-19 18:01   ` Dan Williams
@ 2020-02-19 18:12     ` Jeff Moyer
  2020-02-19 18:53       ` Dan Williams
  0 siblings, 1 reply; 11+ messages in thread
From: Jeff Moyer @ 2020-02-19 18:12 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-nvdimm

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.

-Jeff
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing
  2020-02-19 18:12     ` Jeff Moyer
@ 2020-02-19 18:53       ` Dan Williams
  2020-02-19 19:10         ` Jeff Moyer
  2020-02-19 20:01         ` Verma, Vishal L
  0 siblings, 2 replies; 11+ messages in thread
From: Dan Williams @ 2020-02-19 18:53 UTC (permalink / raw)
  To: Jeff Moyer; +Cc: linux-nvdimm

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing
  2020-02-19 18:53       ` Dan Williams
@ 2020-02-19 19:10         ` Jeff Moyer
  2020-02-19 20:01         ` Verma, Vishal L
  1 sibling, 0 replies; 11+ messages in thread
From: Jeff Moyer @ 2020-02-19 19:10 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-nvdimm

Dan Williams <dan.j.williams@intel.com> writes:

>> >> 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.

Deal.  :)

-Jeff
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing
  2020-02-19 18:53       ` Dan Williams
  2020-02-19 19:10         ` Jeff Moyer
@ 2020-02-19 20:01         ` Verma, Vishal L
  2020-02-19 20:09           ` Dan Williams
  1 sibling, 1 reply; 11+ messages in thread
From: Verma, Vishal L @ 2020-02-19 20:01 UTC (permalink / raw)
  To: Williams, Dan J, jmoyer; +Cc: linux-nvdimm

On Wed, 2020-02-19 at 10:53 -0800, Dan Williams wrote:
> 
> > > > 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.
> 
Hm, this sounds good in concept, but how about waiting for this cleanup
to go in after the (yes, long pending) config rework. Then this can just
be a global config setting, and we won't have config things coming from
the environment as well (which this would be a first of).
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing
  2020-02-19 20:01         ` Verma, Vishal L
@ 2020-02-19 20:09           ` Dan Williams
  2020-02-19 20:28             ` Verma, Vishal L
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Williams @ 2020-02-19 20:09 UTC (permalink / raw)
  To: Verma, Vishal L; +Cc: linux-nvdimm

On Wed, Feb 19, 2020 at 12:01 PM Verma, Vishal L
<vishal.l.verma@intel.com> wrote:
>
> On Wed, 2020-02-19 at 10:53 -0800, Dan Williams wrote:
> >
> > > > > 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.
> >
> Hm, this sounds good in concept, but how about waiting for this cleanup
> to go in after the (yes, long pending) config rework. Then this can just
> be a global config setting, and we won't have config things coming from
> the environment as well (which this would be a first of).

That does make some sense, but I notice that git deals with "cosmetic"
environment variables (GIT_EDITOR, GIT_PAGER, etc) in addition to its
config file. So if we're borrowing from git, I'd also borrow that
config vs environment logic.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing
  2020-02-19 20:09           ` Dan Williams
@ 2020-02-19 20:28             ` Verma, Vishal L
  2020-02-21 10:21               ` qi.fuli
  0 siblings, 1 reply; 11+ messages in thread
From: Verma, Vishal L @ 2020-02-19 20:28 UTC (permalink / raw)
  To: Williams, Dan J; +Cc: linux-nvdimm

On Wed, 2020-02-19 at 12:09 -0800, Dan Williams wrote:
> > > 
> > > 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.
> > > 
> > Hm, this sounds good in concept, but how about waiting for this cleanup
> > to go in after the (yes, long pending) config rework. Then this can just
> > be a global config setting, and we won't have config things coming from
> > the environment as well (which this would be a first of).
> 
> That does make some sense, but I notice that git deals with "cosmetic"
> environment variables (GIT_EDITOR, GIT_PAGER, etc) in addition to its
> config file. So if we're borrowing from git, I'd also borrow that
> config vs environment logic.

True, that's reasonable. I guess I was hoping to avoid, if we can,
suddenly having a multitude of config sources, but env variables are
pretty standard and it should be fine to add them.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing
  2020-02-19 20:28             ` Verma, Vishal L
@ 2020-02-21 10:21               ` qi.fuli
  2020-03-01  0:53                 ` Dan Williams
  0 siblings, 1 reply; 11+ messages in thread
From: qi.fuli @ 2020-02-21 10:21 UTC (permalink / raw)
  To: Verma, Vishal L, Williams, Dan J; +Cc: linux-nvdimm



On 2/20/20 5:28 AM, Verma, Vishal L wrote:
> On Wed, 2020-02-19 at 12:09 -0800, Dan Williams wrote:
>>>>
>>>> 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.
>>>>
>>> Hm, this sounds good in concept, but how about waiting for this cleanup
>>> to go in after the (yes, long pending) config rework. Then this can just
>>> be a global config setting, and we won't have config things coming from
>>> the environment as well (which this would be a first of).
>>
>> That does make some sense, but I notice that git deals with "cosmetic"
>> environment variables (GIT_EDITOR, GIT_PAGER, etc) in addition to its
>> config file. So if we're borrowing from git, I'd also borrow that
>> config vs environment logic.
> 
> True, that's reasonable. I guess I was hoping to avoid, if we can,
> suddenly having a multitude of config sources, but env variables are
> pretty standard and it should be fine to add them.

Hi,

I am sorry for suspending the ndctl global config patch for such a long 
time. If it is not urgent, I would like to implement it.

Thank you.
QI fuli

> _______________________________________________
> Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
> To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
> 
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ndctl PATCH] ndctl/list: Drop named list objects from verbose listing
  2020-02-21 10:21               ` qi.fuli
@ 2020-03-01  0:53                 ` Dan Williams
  0 siblings, 0 replies; 11+ messages in thread
From: Dan Williams @ 2020-03-01  0:53 UTC (permalink / raw)
  To: qi.fuli; +Cc: linux-nvdimm

On Fri, Feb 21, 2020 at 2:21 AM qi.fuli@fujitsu.com <qi.fuli@fujitsu.com> wrote:
>
>
>
> On 2/20/20 5:28 AM, Verma, Vishal L wrote:
> > On Wed, 2020-02-19 at 12:09 -0800, Dan Williams wrote:
> >>>>
> >>>> 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.
> >>>>
> >>> Hm, this sounds good in concept, but how about waiting for this cleanup
> >>> to go in after the (yes, long pending) config rework. Then this can just
> >>> be a global config setting, and we won't have config things coming from
> >>> the environment as well (which this would be a first of).
> >>
> >> That does make some sense, but I notice that git deals with "cosmetic"
> >> environment variables (GIT_EDITOR, GIT_PAGER, etc) in addition to its
> >> config file. So if we're borrowing from git, I'd also borrow that
> >> config vs environment logic.
> >
> > True, that's reasonable. I guess I was hoping to avoid, if we can,
> > suddenly having a multitude of config sources, but env variables are
> > pretty standard and it should be fine to add them.
>
> Hi,
>
> I am sorry for suspending the ndctl global config patch for such a long
> time. If it is not urgent, I would like to implement it.

It's getting more and more urgent, especially as more people are
trying to use the DIMM security features and finding it difficult to
contend with the command-line interface.

The goal is to import  the git config system. Specifically one of the
features of the git config syntax that are useful for DIMM security
(and in the future Namespace security) is the ability to have named
sub-sections. From the git config man page:

       Sections can be further divided into subsections. To begin a
subsection put its name in double
       quotes, separated by space from the section name, in the
section header, like in the example
       below:

                   [section "subsection"]

With that capability policy can be established by a named object
instance. dimm.<dimm_id>.<attribute>, or namespace.<uuid>.<attribute>.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-03-01  0:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).