ext2, ext4: warn when mounting with dax enabled
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: <stable@vger.kernel.org> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Matthew Wilcox <willy@linux.intel.com> Cc: linux-ext4@vger.kernel.org Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Reported-by: Dave Chinner <david@fromorbit.com> Acked-by: Jan Kara <jack@suse.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
8005c49d9a
commit
ef83b6e8f4
|
@ -569,6 +569,8 @@ static int parse_options(char *options, struct super_block *sb)
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
case Opt_dax:
|
case Opt_dax:
|
||||||
#ifdef CONFIG_FS_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);
|
set_opt(sbi->s_mount_opt, DAX);
|
||||||
#else
|
#else
|
||||||
ext2_msg(sb, KERN_INFO, "dax option not supported");
|
ext2_msg(sb, KERN_INFO, "dax option not supported");
|
||||||
|
|
|
@ -1664,8 +1664,12 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
|
||||||
}
|
}
|
||||||
sbi->s_jquota_fmt = m->mount_opt;
|
sbi->s_jquota_fmt = m->mount_opt;
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_FS_DAX
|
|
||||||
} else if (token == Opt_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");
|
ext4_msg(sb, KERN_INFO, "dax option not supported");
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue