From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "Busch, Keith" <keith.busch@intel.com>
Cc: "Williams, Dan J" <dan.j.williams@intel.com>,
"ross.zwisler@linux.intel.com" <ross.zwisler@linux.intel.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"Jiang, Dave" <dave.jiang@intel.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCHv3 1/2] libnvdimm: Use max contiguous area for namespace size
Date: Fri, 20 Jul 2018 23:17:04 +0000 [thread overview]
Message-ID: <1532128622.10343.28.camel@intel.com> (raw)
In-Reply-To: <20180720214838.GB4864@localhost.localdomain>
On Fri, 2018-07-20 at 15:48 -0600, Keith Busch wrote:
> On Fri, Jul 20, 2018 at 01:46:06PM -0700, Verma, Vishal L wrote:
> > $ cat /sys/bus/nd/devices/region1/max_available_extent
> > 17045651456
> >
> > $ ndctl list -BNR --region=region1
> > [
> > {
> > "provider":"ACPI.NFIT",
> > "dev":"ndbus1",
> > "regions":[
> > {
> > "dev":"region1",
> > "size":17045651456,
> > "available_size":0,
> > "type":"pmem",
> > "numa_node":0,
> > "persistence_domain":"unknown",
> > "namespaces":[
> > {
> > "dev":"namespace1.0",
> > "mode":"raw",
> > "size":17045651456,
> > "sector_size":512,
> > "blockdev":"pmem1",
> > "numa_node":0
> > }
> > ...
> >
>
> As we saw, getting the "available_size" directly from the the
> region's
> sysfs entry also returned the same as max extent:
>
> $ cat /sys/bus/nd/devices/region1/available_size
> 17045651456
>
> The reason ndctl shows available_size as '0' is because the nstype is
> neither of type PMEM nor BLK.
>
> So I think max_available_extent is doing the right thing.
Yep, I agree. I did however see another potential breakage (the blk-
exhaust unit test fails due to this)
ndctl create-namespace --bus=nfit_test.0
creates a namespace on say region 3. That makes available_size for
region3 zero (as reported by ndctl-list as well as directly from
sysfs), but max_available_extent still shows the full size available.
$ sudo ndctl create-namespace --bus=nfit_test.0
{
"dev":"namespace3.0",
"mode":"fsdax",
"map":"dev",
"size":"28.50 MiB (29.89 MB)",
"uuid":"592071ed-0928-4be8-96fb-4be944e4c6f4",
"raw_uuid":"c4ac44fa-d3bd-43ea-9a1a-3a083d9fed1d",
"sector_size":512,
"blockdev":"pmem3"
}
$ cat /sys/bus/nd/devices/region3/max_available_extent
33554432
$ cat /sys/bus/nd/devices/region3/available_size
0
And then a subsequent
ndctl create-namespace --bus=nfit_test.0
sees the max_available extent on region 3 (with the corresponding ndctl
patches for this applied), tries to create a namespace again there, and
obviously fails.
As a side note, I think it may be useful to include in the related
ndctl patch, a json entry for the max_available_extent for region
listings.
prev parent reply other threads:[~2018-07-21 0:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-12 15:47 [PATCHv3 1/2] libnvdimm: Use max contiguous area for namespace size Keith Busch
2018-07-20 20:46 ` Verma, Vishal L
2018-07-20 20:54 ` Keith Busch
2018-07-20 21:48 ` Keith Busch
2018-07-20 23:17 ` 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=1532128622.10343.28.camel@intel.com \
--to=vishal.l.verma@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=keith.busch@intel.com \
--cc=linux-nvdimm@lists.01.org \
--cc=ross.zwisler@linux.intel.com \
--cc=stable@vger.kernel.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