Re: [PATCH v2] libnvdimm, pmem: Add sysfs notifications to badblocks

From: Dan Williams
Date: Thu Jun 15 2017 - 17:33:25 EST


On Mon, Jun 12, 2017 at 3:25 PM, Toshi Kani <toshi.kani@xxxxxxx> wrote:
> Sysfs "badblocks" information may be updated during run-time that:
> - MCE, SCI, and sysfs "scrub" may add new bad blocks
> - Writes and ioctl() may clear bad blocks
>
> Add support to send sysfs notifications to sysfs "badblocks" file
> under region and pmem directories when their badblocks information
> is re-evaluated (but is not necessarily changed) during run-time.
>
> Signed-off-by: Toshi Kani <toshi.kani@xxxxxxx>
> Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
> Cc: Vishal Verma <vishal.l.verma@xxxxxxxxx>
> Cc: Linda Knippers <linda.knippers@xxxxxxx>
> ---
> v2: Send notifications for the clearing case
> ---

This looks good to me, I've applied it, but I also want to extend the
ndctl unit tests to cover this mechanism.