Linux-NVDIMM Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "pasha.tatashin@soleen.com" <pasha.tatashin@soleen.com>
Cc: "dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [ndctl PATCH v3 00/10] daxctl: add a new reconfigure-device command
Date: Wed, 22 May 2019 18:05:47 +0000	[thread overview]
Message-ID: <bf9698856035cdfa24969d303f1c452ce160aa4e.camel@intel.com> (raw)
In-Reply-To: <63ad1bacb0016bf722d038546499a6a38cc22501.camel@intel.com>

On Mon, 2019-05-20 at 23:34 +0000, Verma, Vishal L wrote:
> On Fri, 2019-05-17 at 13:41 -0400, Pavel Tatashin wrote:
> > > Hi Pavel,
> > > 
> > > I've still not been able to hit this in my testing, is it
something
> > > you
> > > hit only after applying these patches? i.e. does plain v65 work?
> > 
> > Yes, plain v65 works, but with these patches I see this error.
> > 
> Hm, So there are only two patches that touch the add_dax_dev function:
> 
>   2bf9a8e libdaxctl: add interfaces to enable/disable devices
>   25be8f4 libdaxctl: add interfaces to get/set the online state for a
node
> 
> And of these, the second one to get the target node doesn't return an
> error in any case.
> 
> The first one can fail, so it must be that condition you're hitting,
but
> I'm not sure in what way it is failing.
> 
> The exact check is:
> 
> 	sprintf(path, "%s/modalias", daxdev_base);
> 	rc = sysfs_read_attr(ctx, path, buf);
> 	/* older kernels may be lack the modalias attribute */
> 	if (rc < 0 && rc != -ENOENT)
> 		goto err_read;
> 	if (rc == 0) {
> 		dev->kmod_list = to_module_list(ctx, buf);
> 		if (dev->kmod_list == NULL)
> 			goto err_read;

Dan points out that it might actually be the kmod portion that might be
failing. Is libkmod present in the buildroot setup, and has a depmod run
completed successfully before this point?

In any case, this incremental patch should /at least/ delay the error
until you actually try to enable a kmem device. I'll fold this into the
next version of the series.

8<----


>From 2df9b6401a69833fa709ab1ad83ac27b545aeb9e Mon Sep 17 00:00:00 2001
From: Vishal Verma <vishal.l.verma@intel.com>
Date: Wed, 22 May 2019 12:01:28 -0600
Subject: [ndctl PATCH] fixup! libdaxctl: add interfaces to
enable/disable
 devices

---
 daxctl/lib/libdaxctl.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/daxctl/lib/libdaxctl.c b/daxctl/lib/libdaxctl.c
index 5c85328..9d23d12 100644
--- a/daxctl/lib/libdaxctl.c
+++ b/daxctl/lib/libdaxctl.c
@@ -393,12 +393,8 @@ static void *add_dax_dev(void *parent, int id,
const char *daxdev_base)
 	/* older kernels may be lack the modalias attribute */
 	if (rc < 0 && rc != -ENOENT)
 		goto err_read;
-	if (rc == 0) {
+	if (rc == 0)
 		dev->kmod_list = to_module_list(ctx, buf);
-		if (dev->kmod_list == NULL)
-			goto err_read;
-	} else
-		dbg(ctx, "%s: modalias attribute missing\n", devname);
 
 	sprintf(path, "%s/target_node", daxdev_base);
 	if (sysfs_read_attr(ctx, path, buf) == 0)
-- 
2.20.1


_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

      reply	other threads:[~2019-05-22 18:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 22:40 [ndctl PATCH v3 00/10] daxctl: add a new reconfigure-device command Vishal Verma
2019-05-16 22:40 ` [ndctl PATCH v3 01/10] libdaxctl: add interfaces in support of device modes Vishal Verma
2019-05-16 22:40 ` [ndctl PATCH v3 02/10] libdaxctl: cache 'subsystem' in daxctl_ctx Vishal Verma
2019-05-16 22:40 ` [ndctl PATCH v3 03/10] libdaxctl: add interfaces to enable/disable devices Vishal Verma
2019-05-16 22:40 ` [ndctl PATCH v3 04/10] libdaxctl: add interfaces to get/set the online state for a node Vishal Verma
2019-05-16 22:40 ` [ndctl PATCH v3 05/10] daxctl/list: add numa_node for device listings Vishal Verma
2019-05-16 22:40 ` [ndctl PATCH v3 06/10] libdaxctl: add an interface to get the mode for a dax device Vishal Verma
2019-05-16 22:40 ` [ndctl PATCH v3 07/10] daxctl: add a new reconfigure-device command Vishal Verma
2019-05-16 22:40 ` [ndctl PATCH v3 08/10] Documentation/daxctl: add a man page for daxctl-reconfigure-device Vishal Verma
2019-05-16 22:40 ` [ndctl PATCH v3 09/10] contrib/ndctl: fix region-id completions for daxctl Vishal Verma
2019-05-16 22:40 ` [ndctl PATCH v3 10/10] contrib/ndctl: add bash-completion for daxctl-reconfigure-device Vishal Verma
2019-05-17 15:30 ` [ndctl PATCH v3 00/10] daxctl: add a new reconfigure-device command Pavel Tatashin
2019-05-17 17:38   ` Verma, Vishal L
2019-05-17 17:41     ` Pavel Tatashin
2019-05-20 23:34       ` Verma, Vishal L
2019-05-22 18:05         ` 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=bf9698856035cdfa24969d303f1c452ce160aa4e.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=pasha.tatashin@soleen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox