All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: "Elliott, Robert (Persistent Memory)" <elliott@hpe.com>
Cc: "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH 1/3] dev-dax: add support to display badblocks in sysfs for dev-dax
Date: Thu, 15 Dec 2016 18:43:51 -0800	[thread overview]
Message-ID: <CAPcyv4he+6hu6PFiAtdkvjfPo4GB9tnMqYr7uPSpkkqj2kz6hA@mail.gmail.com> (raw)
In-Reply-To: <DF4PR84MB0169815E607E12A0B343B9FDAB9C0@DF4PR84MB0169.NAMPRD84.PROD.OUTLOOK.COM>

On Thu, Dec 15, 2016 at 5:52 PM, Elliott, Robert (Persistent Memory)
<elliott@hpe.com> wrote:
>> -----Original Message-----
>> From: Linux-nvdimm [mailto:linux-nvdimm-bounces@lists.01.org] On
>> Behalf Of Dave Jiang
>> Sent: Monday, December 12, 2016 6:15 PM
>> Subject: [PATCH 1/3] dev-dax: add support to display badblocks in
>> sysfs for dev-dax
>>
>> Adding support to show badblocks in the pmem region that's provided
>> by the poison_list. This should show up in
>> /sys/class/dax/daxN.N/badblocks as read only. Currently we only
>> support
>> a single resource and we do not support badblocks for seeds.
>> Additional
>> support code will be implemented to support.
>>
> ...
>> diff --git a/drivers/dax/pmem.c b/drivers/dax/pmem.c
> ...
>> +static ssize_t dax_pmem_badblocks_show(struct device *dev,
>> +struct device_attribute *attr, char *page)
>> +{
>> +struct dax_pmem *dax_pmem =
>> +(struct dax_pmem *)dax_dev_get_private(dev);
>> +
>> +return badblocks_show(&dax_pmem->bb, page, 0);
>> +}
>
> Do /dev/dax devices have a "block size" to explain the units used in
> the sysfs files?  If so, where is it reported?

The "badblocks" sysfs interface is always in 512 byte logical units.
If badblocks ever grew support for other block sizes we would add it
as an attribute of the badblocks interface directly and not rely on
traversing other parts of the sysfs topology.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

      reply	other threads:[~2016-12-16  2:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13  0:14 [PATCH 1/3] dev-dax: add support to display badblocks in sysfs for dev-dax Dave Jiang
2016-12-13  0:14 ` [PATCH 2/3] nvdimm-testing: providing dax support for nvdimm testing Dave Jiang
2016-12-13  0:15 ` [PATCH 3/3] dev-dax: add fallocate support to clear poison Dave Jiang
     [not found] ` <148158809239.159590.16102609849408268953.stgit-Cxk7aZI4ujnJARH06PadV2t3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2016-12-14 21:12   ` [PATCH 1/3] dev-dax: add support to display badblocks in sysfs for dev-dax Jeff Moyer
     [not found]     ` <x491sxadxkn.fsf-RRHT56Q3PSP4kTEheFKJxxDDeQx5vsVwAInAS/Ez/D0@public.gmane.org>
2016-12-14 22:51       ` Dave Jiang
2016-12-16  1:52 ` Elliott, Robert (Persistent Memory)
2016-12-16  2:43   ` Dan Williams [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=CAPcyv4he+6hu6PFiAtdkvjfPo4GB9tnMqYr7uPSpkkqj2kz6hA@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=elliott@hpe.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 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.