]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ext2: auto disable dax instead of failing mount
authorDan Williams <dan.j.williams@intel.com>
Fri, 22 Dec 2017 02:18:27 +0000 (18:18 -0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 20 Mar 2018 17:20:16 +0000 (14:20 -0300)
BugLink: http://bugs.launchpad.net/bugs/1751724
Bring the ext2 filesystem in line with xfs that only warns and continues
when the "-o dax" option is specified to mount and the backing device
does not support dax. This is in preparation for removing dax support
from devices that do not enable get_user_pages() operations on dax
mappings. In other words 'gup' support is required and configurations
that were using so called 'page-less' dax will be converted back to
using the page cache.

Removing the broken 'page-less' dax support is a pre-requisite for
removing the "EXPERIMENTAL" warning when mounting a filesystem in dax
mode.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
(cherry picked from commit b4b5798cea8f40ab61f3a2c79a26314465dd83e3)
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
fs/ext2/super.c

index 7646818ab266ff81b86003b28f661fdbd7d9ba2f..38f9222606eeb22409c6e0b87044a8c45a66cb68 100644 (file)
@@ -959,8 +959,11 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
 
        if (sbi->s_mount_opt & EXT2_MOUNT_DAX) {
                err = bdev_dax_supported(sb, blocksize);
-               if (err)
-                       goto failed_mount;
+               if (err) {
+                       ext2_msg(sb, KERN_ERR,
+                               "DAX unsupported by block device. Turning off DAX.");
+                       sbi->s_mount_opt &= ~EXT2_MOUNT_DAX;
+               }
        }
 
        /* If the blocksize doesn't match, re-read the thing.. */