From: Dan Williams <dan.j.williams@intel.com>
To: Vishal Verma <vishal.l.verma@intel.com>
Cc: linux-nvdimm <linux-nvdimm@lists.01.org>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Subject: Re: [ndctl PATCH 2/2] ndctl/namespace: introduce ndctl_namespace_is_configurable()
Date: Mon, 4 Nov 2019 08:35:22 -0800 [thread overview]
Message-ID: <CAPcyv4jWXXUgjd-_hsP+sUjBRfwQZQQOSUHUqSrdEYzfz3oS-g@mail.gmail.com> (raw)
In-Reply-To: <20191101202713.5111-2-vishal.l.verma@intel.com>
On Fri, Nov 1, 2019 at 1:27 PM Vishal Verma <vishal.l.verma@intel.com> wrote:
>
> The motivation for this change is that we want to refrain from
> (re)configuring what appear to be partially configured namespaces.
> Namespaces may end up in a state that looks partially configured when
> the kernel isn't able to enable a namespace due to mismatched
> PAGE_SIZE expectations. In such cases, ndctl should not treat those
> as unconfigured 'seed' namespaces, and reuse them.
>
> Add a new ndctl_namespace_is_configurable API, whish tests whether a
> namespaces is active, and whether it is partially configured. If neither
> are true, then it can be used for (re)configuration. Additionally, deal
> with the corner case of ND_DEVICE_NAMESPACE_IO (legacy PMEM) namespaces
> by testing whether the size attribute is read-only (which indicates such
> a namespace). Legacy namespaces always appear as configured, since their
> size cannot be changed, but they are also always re-configurable.
>
> Use this API in namespace_reconfig() and namespace_create() to enable
> this partial configuration detection.
A couple comments.... I think it's probably sufficient to just check
for ND_DEVICE_NAMESPACE_IO as I don't anticipate we'll ever have more
than one namespace type with a read-only size attribute. Also, how
about s/ndctl_namespace_is_configurable/ndctl_namespace_is_configuration_idle/?
Because to me all namespaces are always "configurable", but some may
have active non-default properties set.
_______________________________________________
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-11-04 16:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-01 20:27 [ndctl PATCH 1/2] ndctl/namespace: remove open coded is_namespace_active() Vishal Verma
2019-11-01 20:27 ` [ndctl PATCH 2/2] ndctl/namespace: introduce ndctl_namespace_is_configurable() Vishal Verma
2019-11-04 16:35 ` Dan Williams [this message]
2019-11-04 18:48 ` Verma, Vishal L
2019-11-04 18:58 ` Dan Williams
2019-11-04 19:04 ` Verma, Vishal L
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=CAPcyv4jWXXUgjd-_hsP+sUjBRfwQZQQOSUHUqSrdEYzfz3oS-g@mail.gmail.com \
--to=dan.j.williams@intel.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=linux-nvdimm@lists.01.org \
--cc=vishal.l.verma@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 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).