diff options
author | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2015-02-16 18:59:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-16 20:56:04 -0500 |
commit | 9c3ce9ec58716733232b97771b10f31901caf62e (patch) | |
tree | 25cc2bebbbc248d97f71262a542c7ee0e96411c0 /fs/ext2/super.c | |
parent | 97443aa809a142b1e6db2ccfb046c3a962907204 (diff) |
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>
Diffstat (limited to 'fs/ext2/super.c')
-rw-r--r-- | fs/ext2/super.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 5f029d8c3a02..d0e746e96511 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
@@ -294,6 +294,8 @@ static int ext2_show_options(struct seq_file *seq, struct dentry *root) | |||
294 | #ifdef CONFIG_FS_DAX | 294 | #ifdef CONFIG_FS_DAX |
295 | if (sbi->s_mount_opt & EXT2_MOUNT_XIP) | 295 | if (sbi->s_mount_opt & EXT2_MOUNT_XIP) |
296 | seq_puts(seq, ",xip"); | 296 | seq_puts(seq, ",xip"); |
297 | if (sbi->s_mount_opt & EXT2_MOUNT_DAX) | ||
298 | seq_puts(seq, ",dax"); | ||
297 | #endif | 299 | #endif |
298 | 300 | ||
299 | if (!test_opt(sb, RESERVATION)) | 301 | if (!test_opt(sb, RESERVATION)) |
@@ -402,7 +404,7 @@ enum { | |||
402 | Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, | 404 | Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, |
403 | Opt_err_ro, Opt_nouid32, Opt_nocheck, Opt_debug, | 405 | Opt_err_ro, Opt_nouid32, Opt_nocheck, Opt_debug, |
404 | Opt_oldalloc, Opt_orlov, Opt_nobh, Opt_user_xattr, Opt_nouser_xattr, | 406 | Opt_oldalloc, Opt_orlov, Opt_nobh, Opt_user_xattr, Opt_nouser_xattr, |
405 | Opt_acl, Opt_noacl, Opt_xip, Opt_ignore, Opt_err, Opt_quota, | 407 | Opt_acl, Opt_noacl, Opt_xip, Opt_dax, Opt_ignore, Opt_err, Opt_quota, |
406 | Opt_usrquota, Opt_grpquota, Opt_reservation, Opt_noreservation | 408 | Opt_usrquota, Opt_grpquota, Opt_reservation, Opt_noreservation |
407 | }; | 409 | }; |
408 | 410 | ||
@@ -431,6 +433,7 @@ static const match_table_t tokens = { | |||
431 | {Opt_acl, "acl"}, | 433 | {Opt_acl, "acl"}, |
432 | {Opt_noacl, "noacl"}, | 434 | {Opt_noacl, "noacl"}, |
433 | {Opt_xip, "xip"}, | 435 | {Opt_xip, "xip"}, |
436 | {Opt_dax, "dax"}, | ||
434 | {Opt_grpquota, "grpquota"}, | 437 | {Opt_grpquota, "grpquota"}, |
435 | {Opt_ignore, "noquota"}, | 438 | {Opt_ignore, "noquota"}, |
436 | {Opt_quota, "quota"}, | 439 | {Opt_quota, "quota"}, |
@@ -558,10 +561,14 @@ static int parse_options(char *options, struct super_block *sb) | |||
558 | break; | 561 | break; |
559 | #endif | 562 | #endif |
560 | case Opt_xip: | 563 | case Opt_xip: |
564 | ext2_msg(sb, KERN_INFO, "use dax instead of xip"); | ||
565 | set_opt(sbi->s_mount_opt, XIP); | ||
566 | /* Fall through */ | ||
567 | case Opt_dax: | ||
561 | #ifdef CONFIG_FS_DAX | 568 | #ifdef CONFIG_FS_DAX |
562 | set_opt (sbi->s_mount_opt, XIP); | 569 | set_opt(sbi->s_mount_opt, DAX); |
563 | #else | 570 | #else |
564 | ext2_msg(sb, KERN_INFO, "xip option not supported"); | 571 | ext2_msg(sb, KERN_INFO, "dax option not supported"); |
565 | #endif | 572 | #endif |
566 | break; | 573 | break; |
567 | 574 | ||
@@ -905,15 +912,15 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) | |||
905 | 912 | ||
906 | blocksize = BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size); | 913 | blocksize = BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size); |
907 | 914 | ||
908 | if (sbi->s_mount_opt & EXT2_MOUNT_XIP) { | 915 | if (sbi->s_mount_opt & EXT2_MOUNT_DAX) { |
909 | if (blocksize != PAGE_SIZE) { | 916 | if (blocksize != PAGE_SIZE) { |
910 | ext2_msg(sb, KERN_ERR, | 917 | ext2_msg(sb, KERN_ERR, |
911 | "error: unsupported blocksize for xip"); | 918 | "error: unsupported blocksize for dax"); |
912 | goto failed_mount; | 919 | goto failed_mount; |
913 | } | 920 | } |
914 | if (!sb->s_bdev->bd_disk->fops->direct_access) { | 921 | if (!sb->s_bdev->bd_disk->fops->direct_access) { |
915 | ext2_msg(sb, KERN_ERR, | 922 | ext2_msg(sb, KERN_ERR, |
916 | "error: device does not support xip"); | 923 | "error: device does not support dax"); |
917 | goto failed_mount; | 924 | goto failed_mount; |
918 | } | 925 | } |
919 | } | 926 | } |
@@ -1286,10 +1293,10 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) | |||
1286 | ((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); | 1293 | ((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); |
1287 | 1294 | ||
1288 | es = sbi->s_es; | 1295 | es = sbi->s_es; |
1289 | if ((sbi->s_mount_opt ^ old_opts.s_mount_opt) & EXT2_MOUNT_XIP) { | 1296 | if ((sbi->s_mount_opt ^ old_opts.s_mount_opt) & EXT2_MOUNT_DAX) { |
1290 | ext2_msg(sb, KERN_WARNING, "warning: refusing change of " | 1297 | ext2_msg(sb, KERN_WARNING, "warning: refusing change of " |
1291 | "xip flag with busy inodes while remounting"); | 1298 | "dax flag with busy inodes while remounting"); |
1292 | sbi->s_mount_opt ^= EXT2_MOUNT_XIP; | 1299 | sbi->s_mount_opt ^= EXT2_MOUNT_DAX; |
1293 | } | 1300 | } |
1294 | if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) { | 1301 | if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) { |
1295 | spin_unlock(&sbi->s_lock); | 1302 | spin_unlock(&sbi->s_lock); |