• Toshi Kani's avatar
    pmem: report error on clear poison failure · 3115bb02
    Toshi Kani authored
    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: default avatarToshi Kani <toshi.kani@hpe.com>
    Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    3115bb02
pmem.c 11.5 KB