diff options
author | Mingming Cao <cmm@us.ibm.com> | 2007-07-18 09:00:55 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2007-07-18 09:00:55 -0400 |
commit | 1e2462f93e011f63fd0f1fedd2c05338ca6b31c2 (patch) | |
tree | fc8cb0f94c20b78198e73b3a7319c5678a2e3921 /fs/ext4 | |
parent | 749269facaf87f6e516c3af12763e03181b9c139 (diff) |
ext4: Enable extents by default
Turn on extents feature by default in ext4 filesystem, to get wider
testing of extents feature in ext4dev. This can be disabled using
-o noextents.
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/super.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index b806e689c4aa..9c8baf460588 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -734,7 +734,7 @@ enum { | |||
734 | Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, | 734 | Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, |
735 | Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, | 735 | Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, |
736 | Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, | 736 | Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, |
737 | Opt_grpquota, Opt_extents, | 737 | Opt_grpquota, Opt_extents, Opt_noextents, |
738 | }; | 738 | }; |
739 | 739 | ||
740 | static match_table_t tokens = { | 740 | static match_table_t tokens = { |
@@ -785,6 +785,7 @@ static match_table_t tokens = { | |||
785 | {Opt_usrquota, "usrquota"}, | 785 | {Opt_usrquota, "usrquota"}, |
786 | {Opt_barrier, "barrier=%u"}, | 786 | {Opt_barrier, "barrier=%u"}, |
787 | {Opt_extents, "extents"}, | 787 | {Opt_extents, "extents"}, |
788 | {Opt_noextents, "noextents"}, | ||
788 | {Opt_err, NULL}, | 789 | {Opt_err, NULL}, |
789 | {Opt_resize, "resize"}, | 790 | {Opt_resize, "resize"}, |
790 | }; | 791 | }; |
@@ -1120,6 +1121,9 @@ clear_qf_name: | |||
1120 | case Opt_extents: | 1121 | case Opt_extents: |
1121 | set_opt (sbi->s_mount_opt, EXTENTS); | 1122 | set_opt (sbi->s_mount_opt, EXTENTS); |
1122 | break; | 1123 | break; |
1124 | case Opt_noextents: | ||
1125 | clear_opt (sbi->s_mount_opt, EXTENTS); | ||
1126 | break; | ||
1123 | default: | 1127 | default: |
1124 | printk (KERN_ERR | 1128 | printk (KERN_ERR |
1125 | "EXT4-fs: Unrecognized mount option \"%s\" " | 1129 | "EXT4-fs: Unrecognized mount option \"%s\" " |
@@ -1551,6 +1555,12 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
1551 | 1555 | ||
1552 | set_opt(sbi->s_mount_opt, RESERVATION); | 1556 | set_opt(sbi->s_mount_opt, RESERVATION); |
1553 | 1557 | ||
1558 | /* | ||
1559 | * turn on extents feature by default in ext4 filesystem | ||
1560 | * User -o noextents to turn it off | ||
1561 | */ | ||
1562 | set_opt(sbi->s_mount_opt, EXTENTS); | ||
1563 | |||
1554 | if (!parse_options ((char *) data, sb, &journal_inum, &journal_devnum, | 1564 | if (!parse_options ((char *) data, sb, &journal_inum, &journal_devnum, |
1555 | NULL, 0)) | 1565 | NULL, 0)) |
1556 | goto failed_mount; | 1566 | goto failed_mount; |