On Thu, Dec 15, 2016 at 5:52 PM, Elliott, Robert (Persistent Memory)
<elli...@hpe.com> wrote:
>> -----Original Message-----
>> From: Linux-nvdimm [mailto:linux-nvdimm-boun...@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 via email to