]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
dax: re-enable dax pmd mappings
authorDan Williams <dan.j.williams@intel.com>
Sat, 16 Jan 2016 00:57:01 +0000 (16:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 16 Jan 2016 01:56:32 +0000 (17:56 -0800)
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 <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/Kconfig
fs/dax.c

index 2bb1ef86c411a5483087ba106778532dc661a081..9adee0d7536e11343c9050b84174be6d2b90bdfc 100644 (file)
@@ -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
 
index e1f251dc96545b6e99dd4732be1cc9983ad02184..7af8797590640e032c74f619b9fd1931fed77e15 100644 (file)
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -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;
 
@@ -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;