From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
"nvdimm@lists.linux.dev" <nvdimm@lists.linux.dev>,
"a.manzanares@samsung.com" <a.manzanares@samsung.com>
Cc: "fan.ni@samsung.com" <fan.ni@samsung.com>,
"dave@stgolabs.net" <dave@stgolabs.net>
Subject: Re: [ndctl PATCH] daxctl: Skip over memory failure node status
Date: Wed, 15 Feb 2023 00:36:36 +0000 [thread overview]
Message-ID: <63e11faf0aee21a68be130bb1cf2573837f07422.camel@intel.com> (raw)
In-Reply-To: <20230213213853.436788-1-a.manzanares@samsung.com>
On Mon, 2023-02-13 at 21:39 +0000, Adam Manzanares wrote:
> When trying to match a dax device to a memblock physical address
> memblock_in_dev will fail if the the phys_index sysfs file does
> not exist in the memblock. Currently the memory failure directory
> associated with a node is currently interpreted as a memblock.
> Skip over the memory_failure directory within the node directory.
>
> Signed-off-by: Adam Manzanares <a.manzanares@samsung.com>
> ---
> daxctl/lib/libdaxctl.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/daxctl/lib/libdaxctl.c b/daxctl/lib/libdaxctl.c
> index d990479..b27a8af 100644
> --- a/daxctl/lib/libdaxctl.c
> +++ b/daxctl/lib/libdaxctl.c
> @@ -1552,6 +1552,8 @@ static int daxctl_memory_op(struct daxctl_memory *mem, enum memory_op op)
> errno = 0;
> while ((de = readdir(node_dir)) != NULL) {
> if (strncmp(de->d_name, "memory", 6) == 0) {
> + if (strncmp(de->d_name, "memory_", 7) == 0)
> + continue;
> rc = memblock_in_dev(mem, de->d_name);
> if (rc < 0)
> goto out_dir;
Applied, thanks Adam and Dan!
prev parent reply other threads:[~2023-02-15 0:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230213213916uscas1p2ee91a53c14ec5ddcb31322212af6cdaa@uscas1p2.samsung.com>
2023-02-13 21:39 ` [ndctl PATCH] daxctl: Skip over memory failure node status Adam Manzanares
2023-02-13 23:26 ` Dan Williams
2023-02-14 6:57 ` Adam Manzanares
2023-02-14 21:52 ` Dan Williams
2023-02-15 0:36 ` Verma, Vishal L [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=63e11faf0aee21a68be130bb1cf2573837f07422.camel@intel.com \
--to=vishal.l.verma@intel.com \
--cc=a.manzanares@samsung.com \
--cc=dave@stgolabs.net \
--cc=fan.ni@samsung.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
/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