Skip to content

Commit

Permalink
ext4: hard fail dax mount on unsupported devices
Browse files Browse the repository at this point in the history
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 <sandeen@sandeen.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
Eric Sandeen authored and Theodore Ts'o committed Dec 4, 2018
1 parent 32ea275 commit 361d24d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 361d24d

Please sign in to comment.