Skip to content

Commit

Permalink
dax: re-enable dax pmd mappings
Browse files Browse the repository at this point in the history
Now that the get_user_pages() path knows how to handle dax-pmd mappings,
remove the protections that disabled dax-pmd support.

Tests available from github.com/pmem/ndctl:

    make TESTS="lib/test-dax.sh lib/test-mmap.sh" check

Signed-off-by: Dan Williams <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
djbw authored and torvalds committed Jan 16, 2016
1 parent cbb38e4 commit c046c32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ config FS_DAX_PMD
bool
default FS_DAX
depends on FS_DAX
depends on BROKEN
depends on ZONE_DEVICE
depends on TRANSPARENT_HUGEPAGE

endif # BLOCK

Expand Down
8 changes: 2 additions & 6 deletions fs/dax.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address,
sector_t block;
int result = 0;

/* dax pmd mappings are broken wrt gup and fork */
/* dax pmd mappings require pfn_t_devmap() */
if (!IS_ENABLED(CONFIG_FS_DAX_PMD))
return VM_FAULT_FALLBACK;

Expand Down Expand Up @@ -717,11 +717,7 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address,
goto fallback;
}

/*
* TODO: teach vmf_insert_pfn_pmd() to support
* 'pte_special' for pmds
*/
if (pfn_t_has_page(dax.pfn)) {
if (!pfn_t_devmap(dax.pfn)) {
dax_unmap_atomic(bdev, &dax);
dax_pmd_dbg(&bh, address, "pfn not in memmap");
goto fallback;
Expand Down

0 comments on commit c046c32

Please sign in to comment.