Skip to content

Commit 8b3db97

Browse files
djbwstellarhopper
authored andcommitted
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: Jeff Moyer <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: Vishal Verma <[email protected]>
1 parent a8078b1 commit 8b3db97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/dax.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -855,8 +855,8 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address,
855855
long length = dax_map_atomic(bdev, &dax);
856856

857857
if (length < 0) {
858-
result = VM_FAULT_SIGBUS;
859-
goto out;
858+
dax_pmd_dbg(&bh, address, "dax-error fallback");
859+
goto fallback;
860860
}
861861
if (length < PMD_SIZE) {
862862
dax_pmd_dbg(&bh, address, "dax-length too small");

0 commit comments

Comments
 (0)