All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "dan.j.williams@intel.com" <dan.j.williams@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [RFC PATCH] dax: add badblocks check to Device DAX
Date: Wed, 3 May 2017 23:25:38 +0000	[thread overview]
Message-ID: <1493853934.30303.51.camel@hpe.com> (raw)
In-Reply-To: <CAPcyv4g4-H76AMYv2TUtwmFZSc_p58UeiqVmKpJJbOY3g26FwA@mail.gmail.com>

On Wed, 2017-05-03 at 16:08 -0700, Dan Williams wrote:
> On Wed, May 3, 2017 at 3:51 PM, Dan Williams <dan.j.williams@intel.co
> m> wrote:
> > On Wed, May 3, 2017 at 3:41 PM, Kani, Toshimitsu <toshi.kani@hpe.co
> > m> wrote:
> > > On Wed, 2017-05-03 at 14:48 -0700, Dan Williams wrote:
 :
> > 
> > I believe we already have all the data needed to calculate the data
> > offset. Given the following sysfs path:
> > 
> >     /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/region1
> > /dax1.1/dax/dax1.0
> > 
> > ...we can find the associated namespace device from that dax1.1.
> > From
> > there we have the base address of the namespace and the size
> > device-dax instance.
> > 
> >     device_dax_data_offset == namespace_base + namespace_size -
> > device_dax_size
> 
> Dave reminds me that we do have the data offset of the device-dax
> instance at the libnvdimm level:
> 
>     /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/region1/d
> ax1.1/resource
> 
> ...in this example, which maps to ndctl_dax_get_resource().

Thanks for the info!  I noticed why I did not catch this info before.

# ll /dev/dax*
crw------- 1 root root 251, 3 May  3 04:28 /dev/dax0.0

# pwd
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/region0/dax0.0

# grep . *
align:2097152
devtype:nd_dax
modalias:nd:t7
mode:none
numa_node:0
grep: power: Is a directory
grep: resource: No such device or address
grep: size: No such device or address
grep: subsystem: Is a directory
uevent:DEVTYPE=nd_dax
uevent:MODALIAS=nd:t7

But I noticed that "resource" and "size" that are under
".../region0/dax0.1" work.  Is this intended?

-Toshi

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

WARNING: multiple messages have this Message-ID (diff)
From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "dan.j.williams@intel.com" <dan.j.williams@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dave.jiang@intel.com" <dave.jiang@intel.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>
Subject: Re: [RFC PATCH] dax: add badblocks check to Device DAX
Date: Wed, 3 May 2017 23:25:38 +0000	[thread overview]
Message-ID: <1493853934.30303.51.camel@hpe.com> (raw)
In-Reply-To: <CAPcyv4g4-H76AMYv2TUtwmFZSc_p58UeiqVmKpJJbOY3g26FwA@mail.gmail.com>

On Wed, 2017-05-03 at 16:08 -0700, Dan Williams wrote:
> On Wed, May 3, 2017 at 3:51 PM, Dan Williams <dan.j.williams@intel.co
> m> wrote:
> > On Wed, May 3, 2017 at 3:41 PM, Kani, Toshimitsu <toshi.kani@hpe.co
> > m> wrote:
> > > On Wed, 2017-05-03 at 14:48 -0700, Dan Williams wrote:
 :
> > 
> > I believe we already have all the data needed to calculate the data
> > offset. Given the following sysfs path:
> > 
> >     /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/region1
> > /dax1.1/dax/dax1.0
> > 
> > ...we can find the associated namespace device from that dax1.1.
> > From
> > there we have the base address of the namespace and the size
> > device-dax instance.
> > 
> >     device_dax_data_offset == namespace_base + namespace_size -
> > device_dax_size
> 
> Dave reminds me that we do have the data offset of the device-dax
> instance at the libnvdimm level:
> 
>     /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/region1/d
> ax1.1/resource
> 
> ...in this example, which maps to ndctl_dax_get_resource().

Thanks for the info!  I noticed why I did not catch this info before.

# ll /dev/dax*
crw------- 1 root root 251, 3 May  3 04:28 /dev/dax0.0

# pwd
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/region0/dax0.0

# grep . *
align:2097152
devtype:nd_dax
modalias:nd:t7
mode:none
numa_node:0
grep: power: Is a directory
grep: resource: No such device or address
grep: size: No such device or address
grep: subsystem: Is a directory
uevent:DEVTYPE=nd_dax
uevent:MODALIAS=nd:t7

But I noticed that "resource" and "size" that are under
".../region0/dax0.1" work.  Is this intended?

-Toshi

  reply	other threads:[~2017-05-03 23:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 15:31 [RFC PATCH] dax: add badblocks check to Device DAX Toshi Kani
2017-05-03 15:31 ` Toshi Kani
2017-05-03 15:52 ` Dan Williams
2017-05-03 15:52   ` Dan Williams
2017-05-03 16:09   ` Kani, Toshimitsu
2017-05-03 16:09     ` Kani, Toshimitsu
2017-05-03 16:30     ` Dan Williams
2017-05-03 16:30       ` Dan Williams
2017-05-03 18:46       ` Kani, Toshimitsu
2017-05-03 18:46         ` Kani, Toshimitsu
2017-05-03 21:48         ` Dan Williams
2017-05-03 21:48           ` Dan Williams
2017-05-03 21:56           ` Dave Jiang
2017-05-03 21:56             ` Dave Jiang
2017-05-03 22:41           ` Kani, Toshimitsu
2017-05-03 22:41             ` Kani, Toshimitsu
2017-05-03 22:51             ` Dan Williams
2017-05-03 22:51               ` Dan Williams
2017-05-03 23:08               ` Dan Williams
2017-05-03 23:08                 ` Dan Williams
2017-05-03 23:25                 ` Kani, Toshimitsu [this message]
2017-05-03 23:25                   ` Kani, Toshimitsu
2017-05-03 23:36                   ` Kani, Toshimitsu
2017-05-03 23:36                     ` Kani, Toshimitsu
2017-05-04  2:01                     ` Dan Williams
2017-05-04  2:01                       ` Dan Williams
2017-05-04 14:08                       ` Kani, Toshimitsu
2017-05-04 14:08                         ` Kani, Toshimitsu

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=1493853934.30303.51.camel@hpe.com \
    --to=toshi.kani@hpe.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.