From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "aneesh.kumar@linux.ibm.com" <aneesh.kumar@linux.ibm.com>,
"Williams, Dan J" <dan.j.williams@intel.com>
Cc: "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH] Consider namespace with size as active namespace
Date: Wed, 30 Oct 2019 23:39:31 +0000 [thread overview]
Message-ID: <211de3f5c7eafcdd64301954db2382888b7e9982.camel@intel.com> (raw)
In-Reply-To: <269a4c1c-f1c5-6b18-3482-a9640d0a816b@linux.ibm.com>
On Thu, 2019-10-17 at 08:35 +0530, Aneesh Kumar K.V wrote:
>
> > > ---
> > > ndctl/namespace.c | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/ndctl/namespace.c b/ndctl/namespace.c
> > > index 58a9e3c53474..1f212a2b3a9b 100644
> > > --- a/ndctl/namespace.c
> > > +++ b/ndctl/namespace.c
> > > @@ -455,7 +455,8 @@ static int is_namespace_active(struct ndctl_namespace *ndns)
> > > return ndns && (ndctl_namespace_is_enabled(ndns)
> > > || ndctl_namespace_get_pfn(ndns)
> > > || ndctl_namespace_get_dax(ndns)
> > > - || ndctl_namespace_get_btt(ndns));
> > > + || ndctl_namespace_get_btt(ndns)
> > > + || ndctl_namespace_get_size(ndns));
> > > }
> > >
> > > /*
[..]
>
> > The failing unit tests are sector-mode.sh and dax.sh
> >
>
> I will see if i can run them on ppc64. We still had issues in getting
> ndctl check to be running on ppc64.
>
I dug into this a bit more.
The failure happens on 'legacy' namespaces (ND_DEVICE_NAMESPACE_IO).
There is an assumption that legacy namespaces cannot be fully deleted,
so as part of a reconfigure, when it comes time to delete the namespace
(ndctl_namespace_delete()), we refuse to do that, and bail, before
setting the size to zero.
libndctl.c:4467
case ND_DEVICE_NAMESPACE_BLK:
break;
default:
dbg(ctx, "%s: nstype: %d not deletable\n",
ndctl_namespace_get_devname(ndns),
ndctl_namespace_get_type(ndns));
return 0;
}
rc = namespace_set_size(ndns, 0);
...
Indeed, destroy namespace wouldn't even get to that point, because that
assumption is repeated in namespace_destroy(), where we switch on
namespace type, and potentially skip over the ndctl_namespace_destroy
call entirely.
If setting the size to zero is now significant we'd need to rework both
of these sites. In destroy_namespace(), delay the did_zero checking
until after ndctl_namespace_delete(), and in ndctl_namespace_delete(),
set the size to zero before the type check.
Dan, does the above make sense - was there reason to refrain from
touching the size on legacy namespaces?
-Vishal
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
next prev parent reply other threads:[~2019-10-30 23:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 4:39 [PATCH] Consider namespace with size as active namespace Aneesh Kumar K.V
2019-10-16 22:31 ` Verma, Vishal L
2019-10-17 3:05 ` Aneesh Kumar K.V
2019-10-30 23:39 ` Verma, Vishal L [this message]
2019-10-31 18:10 ` Dan Williams
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=211de3f5c7eafcdd64301954db2382888b7e9982.camel@intel.com \
--to=vishal.l.verma@intel.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=linux-nvdimm@lists.01.org \
/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