Commit 8b3db979 authored by Dan Williams's avatar Dan Williams Committed by Vishal Verma

dax: fallback from pmd to pte on error

In preparation for consulting a badblocks list in pmem_direct_access(),
teach dax_pmd_fault() to fallback rather than fail immediately upon
encountering an error.  The thought being that reducing the span of the
dax request may avoid the error region.
Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarVishal Verma <vishal.l.verma@intel.com>
parent a8078b1f
...@@ -855,8 +855,8 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address, ...@@ -855,8 +855,8 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address,
long length = dax_map_atomic(bdev, &dax); long length = dax_map_atomic(bdev, &dax);
if (length < 0) { if (length < 0) {
result = VM_FAULT_SIGBUS; dax_pmd_dbg(&bh, address, "dax-error fallback");
goto out; goto fallback;
} }
if (length < PMD_SIZE) { if (length < PMD_SIZE) {
dax_pmd_dbg(&bh, address, "dax-length too small"); dax_pmd_dbg(&bh, address, "dax-length too small");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment