aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-01-06 14:53:16 -0500
committerTheodore Ts'o <tytso@mit.edu>2009-01-06 14:53:16 -0500
commit83982b6f47201c4c7767210d24d7d8c99567a0b3 (patch)
treef1c19b1c6b5a34dd0c5de7519b78414b7a9267ee /fs/ext4/super.c
parent4d783b093cd4f3e2738527365979cbd1c5101065 (diff)
ext4: Remove "extents" mount option
This mount option is largely superfluous, and in fact the way it was implemented was buggy; if a filesystem which did not have the extents feature flag was mounted -o extents, the filesystem would attempt to create and use extents-based file even though the extents feature flag was not eabled. The simplest thing to do is to nuke the mount option entirely. It's not all that useful to force the non-creation of new extent-based files if the filesystem can support it. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c48
1 files changed, 2 insertions, 46 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b69d09203865..acb69c00fd42 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -829,8 +829,6 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs)
829 seq_puts(seq, ",journal_async_commit"); 829 seq_puts(seq, ",journal_async_commit");
830 if (test_opt(sb, NOBH)) 830 if (test_opt(sb, NOBH))
831 seq_puts(seq, ",nobh"); 831 seq_puts(seq, ",nobh");
832 if (!test_opt(sb, EXTENTS))
833 seq_puts(seq, ",noextents");
834 if (test_opt(sb, I_VERSION)) 832 if (test_opt(sb, I_VERSION))
835 seq_puts(seq, ",i_version"); 833 seq_puts(seq, ",i_version");
836 if (!test_opt(sb, DELALLOC)) 834 if (!test_opt(sb, DELALLOC))
@@ -1011,7 +1009,7 @@ enum {
1011 Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, 1009 Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
1012 Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, 1010 Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
1013 Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, 1011 Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
1014 Opt_grpquota, Opt_extents, Opt_noextents, Opt_i_version, 1012 Opt_grpquota, Opt_i_version,
1015 Opt_stripe, Opt_delalloc, Opt_nodelalloc, 1013 Opt_stripe, Opt_delalloc, Opt_nodelalloc,
1016 Opt_inode_readahead_blks, Opt_journal_ioprio 1014 Opt_inode_readahead_blks, Opt_journal_ioprio
1017}; 1015};
@@ -1066,8 +1064,6 @@ static const match_table_t tokens = {
1066 {Opt_quota, "quota"}, 1064 {Opt_quota, "quota"},
1067 {Opt_usrquota, "usrquota"}, 1065 {Opt_usrquota, "usrquota"},
1068 {Opt_barrier, "barrier=%u"}, 1066 {Opt_barrier, "barrier=%u"},
1069 {Opt_extents, "extents"},
1070 {Opt_noextents, "noextents"},
1071 {Opt_i_version, "i_version"}, 1067 {Opt_i_version, "i_version"},
1072 {Opt_stripe, "stripe=%u"}, 1068 {Opt_stripe, "stripe=%u"},
1073 {Opt_resize, "resize"}, 1069 {Opt_resize, "resize"},
@@ -1115,7 +1111,6 @@ static int parse_options(char *options, struct super_block *sb,
1115 int qtype, qfmt; 1111 int qtype, qfmt;
1116 char *qname; 1112 char *qname;
1117#endif 1113#endif
1118 ext4_fsblk_t last_block;
1119 1114
1120 if (!options) 1115 if (!options)
1121 return 1; 1116 return 1;
@@ -1445,33 +1440,6 @@ set_qf_format:
1445 case Opt_bh: 1440 case Opt_bh:
1446 clear_opt(sbi->s_mount_opt, NOBH); 1441 clear_opt(sbi->s_mount_opt, NOBH);
1447 break; 1442 break;
1448 case Opt_extents:
1449 if (!EXT4_HAS_INCOMPAT_FEATURE(sb,
1450 EXT4_FEATURE_INCOMPAT_EXTENTS)) {
1451 ext4_warning(sb, __func__,
1452 "extents feature not enabled "
1453 "on this filesystem, use tune2fs");
1454 return 0;
1455 }
1456 set_opt(sbi->s_mount_opt, EXTENTS);
1457 break;
1458 case Opt_noextents:
1459 /*
1460 * When e2fsprogs support resizing an already existing
1461 * ext3 file system to greater than 2**32 we need to
1462 * add support to block allocator to handle growing
1463 * already existing block mapped inode so that blocks
1464 * allocated for them fall within 2**32
1465 */
1466 last_block = ext4_blocks_count(sbi->s_es) - 1;
1467 if (last_block > 0xffffffffULL) {
1468 printk(KERN_ERR "EXT4-fs: Filesystem too "
1469 "large to mount with "
1470 "-o noextents options\n");
1471 return 0;
1472 }
1473 clear_opt(sbi->s_mount_opt, EXTENTS);
1474 break;
1475 case Opt_i_version: 1443 case Opt_i_version:
1476 set_opt(sbi->s_mount_opt, I_VERSION); 1444 set_opt(sbi->s_mount_opt, I_VERSION);
1477 sb->s_flags |= MS_I_VERSION; 1445 sb->s_flags |= MS_I_VERSION;
@@ -2136,18 +2104,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
2136 set_opt(sbi->s_mount_opt, BARRIER); 2104 set_opt(sbi->s_mount_opt, BARRIER);
2137 2105
2138 /* 2106 /*
2139 * turn on extents feature by default in ext4 filesystem
2140 * only if feature flag already set by mkfs or tune2fs.
2141 * Use -o noextents to turn it off
2142 */
2143 if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS))
2144 set_opt(sbi->s_mount_opt, EXTENTS);
2145 else
2146 ext4_warning(sb, __func__,
2147 "extents feature not enabled on this filesystem, "
2148 "use tune2fs.");
2149
2150 /*
2151 * enable delayed allocation by default 2107 * enable delayed allocation by default
2152 * Use -o nodelalloc to turn it off 2108 * Use -o nodelalloc to turn it off
2153 */ 2109 */
@@ -3825,7 +3781,7 @@ static void __exit exit_ext4_fs(void)
3825} 3781}
3826 3782
3827MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); 3783MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
3828MODULE_DESCRIPTION("Fourth Extended Filesystem with extents"); 3784MODULE_DESCRIPTION("Fourth Extended Filesystem");
3829MODULE_LICENSE("GPL"); 3785MODULE_LICENSE("GPL");
3830module_init(init_ext4_fs) 3786module_init(init_ext4_fs)
3831module_exit(exit_ext4_fs) 3787module_exit(exit_ext4_fs)