]> git.baikalelectronics.ru Git - kernel.git/commit
pmem: report error on clear poison failure
authorToshi Kani <toshi.kani@hpe.com>
Thu, 13 Oct 2016 15:54:21 +0000 (09:54 -0600)
committerDan Williams <dan.j.williams@intel.com>
Wed, 19 Oct 2016 17:35:52 +0000 (10:35 -0700)
commit9ec1545421c6ec709e2d19c02d36793df2279b35
tree975efbbc07264df4bc1e454203da10852b521f88
parentc4d0821d94a30473a0b2aef8ca7b48b496d275a4
pmem: report error on clear poison failure

ACPI Clear Uncorrectable Error DSM function may fail or may be
unsupported on a platform.  pmem_clear_poison() returns without clearing
badblocks in such cases.  This failure is detected at the next read
(-EIO).

This behavior can lead to an issue when user keeps writing but does not
read immediately.  For instance, flight recorder file may be only read
when it is necessary for troubleshooting.

Change pmem_do_bvec() and pmem_clear_poison() to return -EIO so that
filesystem can log an error message on a write error.

Cc: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/pmem.c