libnvdimm: add support for clear poison list and badblocks for device dax
authorDave Jiang <dave.jiang@intel.com>
Fri, 7 Apr 2017 22:33:31 +0000 (15:33 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 13 Apr 2017 04:56:43 +0000 (21:56 -0700)
commit006358b35c73ab75544fb4509483a81ef1a9c0b2
tree9f0ac88e27f376ba6b714763def8837167518acd
parent802f4be6feee3f0395c26ac9717da5b15f6b8fec
libnvdimm: add support for clear poison list and badblocks for device dax

Providing mechanism to clear poison list via the ndctl ND_CMD_CLEAR_ERROR
call. We will update the poison list and also the badblocks at region level
if the region is in dax mode or in pmem mode and not active. In other
words we force badblocks to be cleared through write requests if the
address is currently accessed through a block device, otherwise it can
only be done via the ioctl+dsm path.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/bus.c
drivers/nvdimm/core.c
drivers/nvdimm/region.c
include/linux/libnvdimm.h