]> git.baikalelectronics.ru Git - kernel.git/commit
pmem: implement pmem_recovery_write()
authorJane Chu <jane.chu@oracle.com>
Fri, 13 May 2022 22:13:20 +0000 (15:13 -0700)
committerDan Williams <dan.j.williams@intel.com>
Mon, 16 May 2022 20:38:19 +0000 (13:38 -0700)
commitc5f30e7a0600bf8bbf6dc7f2431d8d79b1eef0a0
treee335ac2703aa90988d00b5f5a56f335e4e77e70b
parent4739177a69db8645da893c6e06c4632844e7146f
pmem: implement pmem_recovery_write()

The recovery write thread started out as a normal pwrite thread and
when the filesystem was told about potential media error in the
range, filesystem turns the normal pwrite to a dax_recovery_write.

The recovery write consists of clearing media poison, clearing page
HWPoison bit, reenable page-wide read-write permission, flush the
caches and finally write.  A competing pread thread will be held
off during the recovery process since data read back might not be
valid, and this is achieved by clearing the badblock records after
the recovery write is complete. Competing recovery write threads
are already serialized by writer lock held by dax_iomap_rw().

Signed-off-by: Jane Chu <jane.chu@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/165247997655.53156.8381418704988035976.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/pmem.c