diff options
author | Lukas Czerner <lczerner@redhat.com> | 2011-08-16 12:08:06 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2011-08-17 05:42:19 -0400 |
commit | fbc854027c91fa2813ae7f9de43cc0b5c1119f41 (patch) | |
tree | 36003e9919758ac0507034652d0832514728e421 | |
parent | 46130222df8567ffde773216044c7611a1e71d51 (diff) |
ext3: remove deprecated oldalloc
For a long time now orlov is the default block allocator in the ext3. It
performs better than the old one and no one seems to claim otherwise so
we can safely drop it and make oldalloc and orlov mount option
deprecated.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | Documentation/filesystems/ext3.txt | 8 | ||||
-rw-r--r-- | fs/ext3/ialloc.c | 45 | ||||
-rw-r--r-- | fs/ext3/super.c | 8 | ||||
-rw-r--r-- | include/linux/ext3_fs.h | 2 |
4 files changed, 8 insertions, 55 deletions
diff --git a/Documentation/filesystems/ext3.txt b/Documentation/filesystems/ext3.txt index 22f3a0eda1d2..b100adc38adb 100644 --- a/Documentation/filesystems/ext3.txt +++ b/Documentation/filesystems/ext3.txt | |||
@@ -73,14 +73,6 @@ nobarrier (*) This also requires an IO stack which can support | |||
73 | also be used to enable or disable barriers, for | 73 | also be used to enable or disable barriers, for |
74 | consistency with other ext3 mount options. | 74 | consistency with other ext3 mount options. |
75 | 75 | ||
76 | orlov (*) This enables the new Orlov block allocator. It is | ||
77 | enabled by default. | ||
78 | |||
79 | oldalloc This disables the Orlov block allocator and enables | ||
80 | the old block allocator. Orlov should have better | ||
81 | performance - we'd like to get some feedback if it's | ||
82 | the contrary for you. | ||
83 | |||
84 | user_xattr Enables Extended User Attributes. Additionally, you | 76 | user_xattr Enables Extended User Attributes. Additionally, you |
85 | need to have extended attribute support enabled in the | 77 | need to have extended attribute support enabled in the |
86 | kernel configuration (CONFIG_EXT3_FS_XATTR). See the | 78 | kernel configuration (CONFIG_EXT3_FS_XATTR). See the |
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c index bf09cbf938cc..635bd8ce6d59 100644 --- a/fs/ext3/ialloc.c +++ b/fs/ext3/ialloc.c | |||
@@ -178,42 +178,6 @@ error_return: | |||
178 | } | 178 | } |
179 | 179 | ||
180 | /* | 180 | /* |
181 | * There are two policies for allocating an inode. If the new inode is | ||
182 | * a directory, then a forward search is made for a block group with both | ||
183 | * free space and a low directory-to-inode ratio; if that fails, then of | ||
184 | * the groups with above-average free space, that group with the fewest | ||
185 | * directories already is chosen. | ||
186 | * | ||
187 | * For other inodes, search forward from the parent directory\'s block | ||
188 | * group to find a free inode. | ||
189 | */ | ||
190 | static int find_group_dir(struct super_block *sb, struct inode *parent) | ||
191 | { | ||
192 | int ngroups = EXT3_SB(sb)->s_groups_count; | ||
193 | unsigned int freei, avefreei; | ||
194 | struct ext3_group_desc *desc, *best_desc = NULL; | ||
195 | int group, best_group = -1; | ||
196 | |||
197 | freei = percpu_counter_read_positive(&EXT3_SB(sb)->s_freeinodes_counter); | ||
198 | avefreei = freei / ngroups; | ||
199 | |||
200 | for (group = 0; group < ngroups; group++) { | ||
201 | desc = ext3_get_group_desc (sb, group, NULL); | ||
202 | if (!desc || !desc->bg_free_inodes_count) | ||
203 | continue; | ||
204 | if (le16_to_cpu(desc->bg_free_inodes_count) < avefreei) | ||
205 | continue; | ||
206 | if (!best_desc || | ||
207 | (le16_to_cpu(desc->bg_free_blocks_count) > | ||
208 | le16_to_cpu(best_desc->bg_free_blocks_count))) { | ||
209 | best_group = group; | ||
210 | best_desc = desc; | ||
211 | } | ||
212 | } | ||
213 | return best_group; | ||
214 | } | ||
215 | |||
216 | /* | ||
217 | * Orlov's allocator for directories. | 181 | * Orlov's allocator for directories. |
218 | * | 182 | * |
219 | * We always try to spread first-level directories. | 183 | * We always try to spread first-level directories. |
@@ -436,12 +400,9 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, | |||
436 | 400 | ||
437 | sbi = EXT3_SB(sb); | 401 | sbi = EXT3_SB(sb); |
438 | es = sbi->s_es; | 402 | es = sbi->s_es; |
439 | if (S_ISDIR(mode)) { | 403 | if (S_ISDIR(mode)) |
440 | if (test_opt (sb, OLDALLOC)) | 404 | group = find_group_orlov(sb, dir); |
441 | group = find_group_dir(sb, dir); | 405 | else |
442 | else | ||
443 | group = find_group_orlov(sb, dir); | ||
444 | } else | ||
445 | group = find_group_other(sb, dir); | 406 | group = find_group_other(sb, dir); |
446 | 407 | ||
447 | err = -ENOSPC; | 408 | err = -ENOSPC; |
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 2043bcc87719..922d289aeeb3 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -652,8 +652,6 @@ static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
652 | seq_puts(seq, ",nouid32"); | 652 | seq_puts(seq, ",nouid32"); |
653 | if (test_opt(sb, DEBUG)) | 653 | if (test_opt(sb, DEBUG)) |
654 | seq_puts(seq, ",debug"); | 654 | seq_puts(seq, ",debug"); |
655 | if (test_opt(sb, OLDALLOC)) | ||
656 | seq_puts(seq, ",oldalloc"); | ||
657 | #ifdef CONFIG_EXT3_FS_XATTR | 655 | #ifdef CONFIG_EXT3_FS_XATTR |
658 | if (test_opt(sb, XATTR_USER)) | 656 | if (test_opt(sb, XATTR_USER)) |
659 | seq_puts(seq, ",user_xattr"); | 657 | seq_puts(seq, ",user_xattr"); |
@@ -1049,10 +1047,12 @@ static int parse_options (char *options, struct super_block *sb, | |||
1049 | set_opt (sbi->s_mount_opt, DEBUG); | 1047 | set_opt (sbi->s_mount_opt, DEBUG); |
1050 | break; | 1048 | break; |
1051 | case Opt_oldalloc: | 1049 | case Opt_oldalloc: |
1052 | set_opt (sbi->s_mount_opt, OLDALLOC); | 1050 | ext3_msg(sb, KERN_WARNING, |
1051 | "Ignoring deprecated oldalloc option"); | ||
1053 | break; | 1052 | break; |
1054 | case Opt_orlov: | 1053 | case Opt_orlov: |
1055 | clear_opt (sbi->s_mount_opt, OLDALLOC); | 1054 | ext3_msg(sb, KERN_WARNING, |
1055 | "Ignoring deprecated orlov option"); | ||
1056 | break; | 1056 | break; |
1057 | #ifdef CONFIG_EXT3_FS_XATTR | 1057 | #ifdef CONFIG_EXT3_FS_XATTR |
1058 | case Opt_user_xattr: | 1058 | case Opt_user_xattr: |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 67a803aee619..96a30b95e5c2 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -381,7 +381,7 @@ struct ext3_inode { | |||
381 | * Mount flags | 381 | * Mount flags |
382 | */ | 382 | */ |
383 | #define EXT3_MOUNT_CHECK 0x00001 /* Do mount-time checks */ | 383 | #define EXT3_MOUNT_CHECK 0x00001 /* Do mount-time checks */ |
384 | #define EXT3_MOUNT_OLDALLOC 0x00002 /* Don't use the new Orlov allocator */ | 384 | /* EXT3_MOUNT_OLDALLOC was there */ |
385 | #define EXT3_MOUNT_GRPID 0x00004 /* Create files with directory's group */ | 385 | #define EXT3_MOUNT_GRPID 0x00004 /* Create files with directory's group */ |
386 | #define EXT3_MOUNT_DEBUG 0x00008 /* Some debugging messages */ | 386 | #define EXT3_MOUNT_DEBUG 0x00008 /* Some debugging messages */ |
387 | #define EXT3_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */ | 387 | #define EXT3_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */ |