diff mbox series

[2/3] ext4: hard fail dax mount on unsupported devices

Message ID 1539027169-23332-3-git-send-email-sandeen@sandeen.net (mailing list archive)
State Not Applicable
Headers show
Series ext2, ext4, xfs: hard fail dax mount on unsupported devices | expand

Commit Message

Eric Sandeen Oct. 8, 2018, 7:32 p.m. UTC
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>
---
 fs/ext4/super.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Theodore Ts'o Dec. 4, 2018, 5:48 a.m. UTC | #1
On Mon, Oct 08, 2018 at 02:32:48PM -0500, Eric Sandeen wrote:
> 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>

Thanks, applied.

					- Ted
diff mbox series

Patch

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 5863fd2..bf0bea5 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3821,12 +3821,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;
 		}
 	}