ext2: get rid of most mentions of XIP in ext2
To help people transition, accept the 'xip' mount option (and report it in /proc/mounts), but print a message encouraging people to switch over to the 'dax' option. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Boaz Harrosh <boaz@plexistor.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Dave Chinner <david@fromorbit.com> Cc: Jan Kara <jack@suse.cz> Cc: Jens Axboe <axboe@kernel.dk> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user