From: Eric Sandeen Date: Tue, 4 Dec 2018 05:46:39 +0000 (-0500) Subject: ext4: hard fail dax mount on unsupported devices X-Git-Tag: v5.0-rc1~120^2~6 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=361d24d40657d27bf9ba99a961e04171181b9719;p=linux.git ext4: hard fail dax mount on unsupported devices 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 Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/super.c b/fs/ext4/super.c index a39726cc78bc..e862b82066ab 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -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; } }