]> Git Repo - linux.git/commitdiff
ext4: hard fail dax mount on unsupported devices
authorEric Sandeen <[email protected]>
Tue, 4 Dec 2018 05:46:39 +0000 (00:46 -0500)
committerTheodore Ts'o <[email protected]>
Tue, 4 Dec 2018 05:46:39 +0000 (00:46 -0500)
As dax inches closer to production use, an administrator should not
be surprised by silently disabling the feature they asked for.

Signed-off-by: Eric Sandeen <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
fs/ext4/super.c

index a39726cc78bc52f13e1f74ea68c2d736443c7bcf..e862b82066abbcffad194077af01de212c61aa1e 100644 (file)
@@ -3864,12 +3864,12 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
                if (ext4_has_feature_inline_data(sb)) {
                        ext4_msg(sb, KERN_ERR, "Cannot use DAX on a filesystem"
                                        " that may contain inline data");
-                       sbi->s_mount_opt &= ~EXT4_MOUNT_DAX;
+                       goto failed_mount;
                }
                if (!bdev_dax_supported(sb->s_bdev, blocksize)) {
                        ext4_msg(sb, KERN_ERR,
-                               "DAX unsupported by block device. Turning off DAX.");
-                       sbi->s_mount_opt &= ~EXT4_MOUNT_DAX;
+                               "DAX unsupported by block device.");
+                       goto failed_mount;
                }
        }
 
This page took 0.069667 seconds and 4 git commands to generate.