All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: linux-nvdimm <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH 1/3] ndctl: don't print erroneous namespace numa_nodes
Date: Wed, 7 Mar 2018 10:23:32 -0800	[thread overview]
Message-ID: <CAPcyv4hW_EN4Lc0bDVvs8N9_+zDr9HxcqRG6vahhAOfuE1eUaQ@mail.gmail.com> (raw)
In-Reply-To: <20180307180237.9289-1-ross.zwisler@linux.intel.com>

On Wed, Mar 7, 2018 at 10:02 AM, Ross Zwisler
<ross.zwisler@linux.intel.com> wrote:
> If the kernel has CONFIG_NUMA unset namespaces in sysfs will lack a
> numa_node attribute.  In such cases ndctl will report a value of 0 for the
> namespace numa_node in 'ndctl list'.  Instead of reporting potentially bad
> data just hide the numa_node field if it is unsupported.
>
> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
> Fixes: commit f7d3de80a121 ("ndctl: support machines without numa")
> ---
>  ndctl/lib/libndctl.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c
> index ed5a65b..b7180e8 100644
> --- a/ndctl/lib/libndctl.c
> +++ b/ndctl/lib/libndctl.c
> @@ -3008,6 +3008,8 @@ static void *add_namespace(void *parent, int id, const char *ndns_base)
>         sprintf(path, "%s/numa_node", ndns_base);
>         if (sysfs_read_attr(ctx, path, buf) == 0)
>                 ndns->numa_node = strtol(buf, NULL, 0);
> +       else
> +               ndns->numa_node = -1;

Looks good.

Reviewed-by: Dan Williams <dan.j.williams@intel.com>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

      parent reply	other threads:[~2018-03-07 18:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 18:02 [PATCH 1/3] ndctl: don't print erroneous namespace numa_nodes Ross Zwisler
2018-03-07 18:02 ` [PATCH 2/3] ndctl: add numa_node support for regions Ross Zwisler
2018-03-07 18:25   ` Dan Williams
2018-03-07 18:02 ` [PATCH 3/3] ndctl: add filtering based on numa_node Ross Zwisler
2018-03-07 18:36   ` Dan Williams
2018-03-07 18:46     ` Ross Zwisler
2018-03-07 18:53     ` [PATCH v2 " Ross Zwisler
2018-03-07 19:00       ` Dan Williams
2018-03-07 20:42       ` Verma, Vishal L
2018-03-07 20:48         ` Dan Williams
2018-03-07 20:50           ` Verma, Vishal L
2018-03-08 17:21           ` Ross Zwisler
2018-03-08 17:50             ` Dan Williams
2018-03-08 21:08       ` Vishal Verma
2018-03-08 23:57         ` Ross Zwisler
2018-03-08 23:02       ` [PATCH v3 3/3] ndctl: add filtering based on numa node Ross Zwisler
2018-03-07 18:23 ` Dan Williams [this message]

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=CAPcyv4hW_EN4Lc0bDVvs8N9_+zDr9HxcqRG6vahhAOfuE1eUaQ@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=ross.zwisler@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.