From: Dan Williams Date: Tue, 29 Sep 2015 19:48:11 +0000 (-0400) Subject: ext2, ext4: warn when mounting with dax enabled X-Git-Tag: v4.1.12-92~18^2^2~61 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=57e60cbca88654f507bab8de14b7681808c408af;p=users%2Fjedix%2Flinux-maple.git ext2, ext4: warn when mounting with dax enabled Orabug: 22913653 Similar to XFS warn when mounting DAX while it is still considered under development. Also, aspects of the DAX implementation, for example synchronization against multiple faults and faults causing block allocation, depend on the correct implementation in the filesystem. The maturity of a given DAX implementation is filesystem specific. Cc: Cc: "Theodore Ts'o" Cc: Matthew Wilcox Cc: linux-ext4@vger.kernel.org Cc: Kirill A. Shutemov Reported-by: Dave Chinner Acked-by: Jan Kara Signed-off-by: Dan Williams (cherry picked from commit ef83b6e8f40bb24b92ad73b5889732346e54a793) Signed-off-by: Dan Duval --- diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 68e85b664d4a5..b3146dbe69bc7 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -569,6 +569,8 @@ static int parse_options(char *options, struct super_block *sb) /* Fall through */ case Opt_dax: #ifdef CONFIG_FS_DAX + ext2_msg(sb, KERN_WARNING, + "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"); set_opt(sbi->s_mount_opt, DAX); #else ext2_msg(sb, KERN_INFO, "dax option not supported"); diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 0d284635ef3cd..6d594dc5249ee 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1643,8 +1643,12 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token, } sbi->s_jquota_fmt = m->mount_opt; #endif -#ifndef CONFIG_FS_DAX } else if (token == Opt_dax) { +#ifdef CONFIG_FS_DAX + ext4_msg(sb, KERN_WARNING, + "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"); + sbi->s_mount_opt |= m->mount_opt; +#else ext4_msg(sb, KERN_INFO, "dax option not supported"); return -1; #endif