]> git.baikalelectronics.ru Git - kernel.git/commit
libnvdimm: allow legacy (e820) pmem region to clear bad blocks
authorDave Jiang <dave.jiang@intel.com>
Fri, 9 Sep 2016 16:10:08 +0000 (09:10 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sat, 10 Sep 2016 00:34:46 +0000 (17:34 -0700)
commitba5f96b15fe26b67c9f0193e60a1a118fad1b2a0
tree916ab96acbdc05f548e85b3897be7167276b3e4f
parentb770b42b330d540fe8f16d10d3ba99424ae83ed7
libnvdimm: allow legacy (e820) pmem region to clear bad blocks

Bad blocks can be injected via /sys/block/pmemN/badblocks. In a situation
where legacy pmem is being used or a pmem region created by using memmap
kernel parameter, the injected bad blocks are not cleared due to
nvdimm_clear_poison() failing from lack of ndctl function pointer. In
this case we need to just return as handled and allow the bad blocks to
be cleared rather than fail.

Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/bus.c