|
@@ -294,6 +294,8 @@ static int ext2_show_options(struct seq_file *seq, struct dentry *root)
|
|
|
#ifdef CONFIG_FS_DAX
|
|
|
if (sbi->s_mount_opt & EXT2_MOUNT_XIP)
|
|
|
seq_puts(seq, ",xip");
|
|
|
+ if (sbi->s_mount_opt & EXT2_MOUNT_DAX)
|
|
|
+ seq_puts(seq, ",dax");
|
|
|
#endif
|
|
|
|
|
|
if (!test_opt(sb, RESERVATION))
|
|
@@ -402,7 +404,7 @@ enum {
|
|
|
Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic,
|
|
|
Opt_err_ro, Opt_nouid32, Opt_nocheck, Opt_debug,
|
|
|
Opt_oldalloc, Opt_orlov, Opt_nobh, Opt_user_xattr, Opt_nouser_xattr,
|
|
|
- Opt_acl, Opt_noacl, Opt_xip, Opt_ignore, Opt_err, Opt_quota,
|
|
|
+ Opt_acl, Opt_noacl, Opt_xip, Opt_dax, Opt_ignore, Opt_err, Opt_quota,
|
|
|
Opt_usrquota, Opt_grpquota, Opt_reservation, Opt_noreservation
|
|
|
};
|
|
|
|
|
@@ -431,6 +433,7 @@ static const match_table_t tokens = {
|
|
|
{Opt_acl, "acl"},
|
|
|
{Opt_noacl, "noacl"},
|
|
|
{Opt_xip, "xip"},
|
|
|
+ {Opt_dax, "dax"},
|
|
|
{Opt_grpquota, "grpquota"},
|
|
|
{Opt_ignore, "noquota"},
|
|
|
{Opt_quota, "quota"},
|
|
@@ -558,10 +561,14 @@ static int parse_options(char *options, struct super_block *sb)
|
|
|
break;
|
|
|
#endif
|
|
|
case Opt_xip:
|
|
|
+ ext2_msg(sb, KERN_INFO, "use dax instead of xip");
|
|
|
+ set_opt(sbi->s_mount_opt, XIP);
|
|
|
+ /* Fall through */
|
|
|
+ case Opt_dax:
|
|
|
#ifdef CONFIG_FS_DAX
|
|
|
- set_opt (sbi->s_mount_opt, XIP);
|
|
|
+ set_opt(sbi->s_mount_opt, DAX);
|
|
|
#else
|
|
|
- ext2_msg(sb, KERN_INFO, "xip option not supported");
|
|
|
+ ext2_msg(sb, KERN_INFO, "dax option not supported");
|
|
|
#endif
|
|
|
break;
|
|
|
|
|
@@ -905,15 +912,15 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
|
|
|
|
|
|
blocksize = BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size);
|
|
|
|
|
|
- if (sbi->s_mount_opt & EXT2_MOUNT_XIP) {
|
|
|
+ if (sbi->s_mount_opt & EXT2_MOUNT_DAX) {
|
|
|
if (blocksize != PAGE_SIZE) {
|
|
|
ext2_msg(sb, KERN_ERR,
|
|
|
- "error: unsupported blocksize for xip");
|
|
|
+ "error: unsupported blocksize for dax");
|
|
|
goto failed_mount;
|
|
|
}
|
|
|
if (!sb->s_bdev->bd_disk->fops->direct_access) {
|
|
|
ext2_msg(sb, KERN_ERR,
|
|
|
- "error: device does not support xip");
|
|
|
+ "error: device does not support dax");
|
|
|
goto failed_mount;
|
|
|
}
|
|
|
}
|
|
@@ -1286,10 +1293,10 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data)
|
|
|
((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
|
|
|
|
|
|
es = sbi->s_es;
|
|
|
- if ((sbi->s_mount_opt ^ old_opts.s_mount_opt) & EXT2_MOUNT_XIP) {
|
|
|
+ if ((sbi->s_mount_opt ^ old_opts.s_mount_opt) & EXT2_MOUNT_DAX) {
|
|
|
ext2_msg(sb, KERN_WARNING, "warning: refusing change of "
|
|
|
- "xip flag with busy inodes while remounting");
|
|
|
- sbi->s_mount_opt ^= EXT2_MOUNT_XIP;
|
|
|
+ "dax flag with busy inodes while remounting");
|
|
|
+ sbi->s_mount_opt ^= EXT2_MOUNT_DAX;
|
|
|
}
|
|
|
if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) {
|
|
|
spin_unlock(&sbi->s_lock);
|