libnvdimm, pmem: Add sysfs notifications to badblocks
authorToshi Kani <toshi.kani@hpe.com>
Mon, 12 Jun 2017 22:25:11 +0000 (16:25 -0600)
committerDan Williams <dan.j.williams@intel.com>
Thu, 15 Jun 2017 21:31:41 +0000 (14:31 -0700)
commit975750a98c26769fe54785579f4b26c961a7a6f4
tree4bc4f280ad9ff7132a9a5978c5c676ab31d6c2be
parenta117699c6c4a4b1b4e90ed51e393590986567cb4
libnvdimm, pmem: Add sysfs notifications to badblocks

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@hpe.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Linda Knippers <linda.knippers@hpe.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/bus.c
drivers/nvdimm/nd.h
drivers/nvdimm/pmem.c
drivers/nvdimm/pmem.h
drivers/nvdimm/region.c