diff options
author | Theodore Ts'o <tytso@mit.edu> | 2008-10-10 09:40:52 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-10-10 09:40:52 -0400 |
commit | c2ea3fde61f1df1dbf062345f23277dcd6f01dfe (patch) | |
tree | 53ecbf57416326810540494e814c05753bf30874 /fs/ext4/super.c | |
parent | 240799cdf22bd789ea6852653c3b879d35ad0a6c (diff) |
ext4: Remove old legacy block allocator
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 6583aee5177f..dfcd41fafb9f 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -574,7 +574,6 @@ static struct inode *ext4_alloc_inode(struct super_block *sb) | |||
574 | ei->i_acl = EXT4_ACL_NOT_CACHED; | 574 | ei->i_acl = EXT4_ACL_NOT_CACHED; |
575 | ei->i_default_acl = EXT4_ACL_NOT_CACHED; | 575 | ei->i_default_acl = EXT4_ACL_NOT_CACHED; |
576 | #endif | 576 | #endif |
577 | ei->i_block_alloc_info = NULL; | ||
578 | ei->vfs_inode.i_version = 1; | 577 | ei->vfs_inode.i_version = 1; |
579 | ei->vfs_inode.i_data.writeback_index = 0; | 578 | ei->vfs_inode.i_data.writeback_index = 0; |
580 | memset(&ei->i_cached_extent, 0, sizeof(struct ext4_ext_cache)); | 579 | memset(&ei->i_cached_extent, 0, sizeof(struct ext4_ext_cache)); |
@@ -633,7 +632,6 @@ static void destroy_inodecache(void) | |||
633 | 632 | ||
634 | static void ext4_clear_inode(struct inode *inode) | 633 | static void ext4_clear_inode(struct inode *inode) |
635 | { | 634 | { |
636 | struct ext4_block_alloc_info *rsv = EXT4_I(inode)->i_block_alloc_info; | ||
637 | #ifdef CONFIG_EXT4DEV_FS_POSIX_ACL | 635 | #ifdef CONFIG_EXT4DEV_FS_POSIX_ACL |
638 | if (EXT4_I(inode)->i_acl && | 636 | if (EXT4_I(inode)->i_acl && |
639 | EXT4_I(inode)->i_acl != EXT4_ACL_NOT_CACHED) { | 637 | EXT4_I(inode)->i_acl != EXT4_ACL_NOT_CACHED) { |
@@ -646,10 +644,7 @@ static void ext4_clear_inode(struct inode *inode) | |||
646 | EXT4_I(inode)->i_default_acl = EXT4_ACL_NOT_CACHED; | 644 | EXT4_I(inode)->i_default_acl = EXT4_ACL_NOT_CACHED; |
647 | } | 645 | } |
648 | #endif | 646 | #endif |
649 | ext4_discard_reservation(inode); | 647 | ext4_discard_preallocations(inode); |
650 | EXT4_I(inode)->i_block_alloc_info = NULL; | ||
651 | if (unlikely(rsv)) | ||
652 | kfree(rsv); | ||
653 | jbd2_journal_release_jbd_inode(EXT4_SB(inode->i_sb)->s_journal, | 648 | jbd2_journal_release_jbd_inode(EXT4_SB(inode->i_sb)->s_journal, |
654 | &EXT4_I(inode)->jinode); | 649 | &EXT4_I(inode)->jinode); |
655 | } | 650 | } |
@@ -760,8 +755,6 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
760 | seq_puts(seq, ",nobh"); | 755 | seq_puts(seq, ",nobh"); |
761 | if (!test_opt(sb, EXTENTS)) | 756 | if (!test_opt(sb, EXTENTS)) |
762 | seq_puts(seq, ",noextents"); | 757 | seq_puts(seq, ",noextents"); |
763 | if (!test_opt(sb, MBALLOC)) | ||
764 | seq_puts(seq, ",nomballoc"); | ||
765 | if (test_opt(sb, I_VERSION)) | 758 | if (test_opt(sb, I_VERSION)) |
766 | seq_puts(seq, ",i_version"); | 759 | seq_puts(seq, ",i_version"); |
767 | if (!test_opt(sb, DELALLOC)) | 760 | if (!test_opt(sb, DELALLOC)) |
@@ -1373,12 +1366,6 @@ set_qf_format: | |||
1373 | case Opt_nodelalloc: | 1366 | case Opt_nodelalloc: |
1374 | clear_opt(sbi->s_mount_opt, DELALLOC); | 1367 | clear_opt(sbi->s_mount_opt, DELALLOC); |
1375 | break; | 1368 | break; |
1376 | case Opt_mballoc: | ||
1377 | set_opt(sbi->s_mount_opt, MBALLOC); | ||
1378 | break; | ||
1379 | case Opt_nomballoc: | ||
1380 | clear_opt(sbi->s_mount_opt, MBALLOC); | ||
1381 | break; | ||
1382 | case Opt_stripe: | 1369 | case Opt_stripe: |
1383 | if (match_int(&args[0], &option)) | 1370 | if (match_int(&args[0], &option)) |
1384 | return 0; | 1371 | return 0; |
@@ -2040,11 +2027,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
2040 | ext4_warning(sb, __func__, | 2027 | ext4_warning(sb, __func__, |
2041 | "extents feature not enabled on this filesystem, " | 2028 | "extents feature not enabled on this filesystem, " |
2042 | "use tune2fs.\n"); | 2029 | "use tune2fs.\n"); |
2043 | /* | ||
2044 | * turn on mballoc code by default in ext4 filesystem | ||
2045 | * Use -o nomballoc to turn it off | ||
2046 | */ | ||
2047 | set_opt(sbi->s_mount_opt, MBALLOC); | ||
2048 | 2030 | ||
2049 | /* | 2031 | /* |
2050 | * enable delayed allocation by default | 2032 | * enable delayed allocation by default |
@@ -2301,19 +2283,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
2301 | goto failed_mount3; | 2283 | goto failed_mount3; |
2302 | } | 2284 | } |
2303 | 2285 | ||
2304 | /* per fileystem reservation list head & lock */ | ||
2305 | spin_lock_init(&sbi->s_rsv_window_lock); | ||
2306 | sbi->s_rsv_window_root = RB_ROOT; | ||
2307 | /* Add a single, static dummy reservation to the start of the | ||
2308 | * reservation window list --- it gives us a placeholder for | ||
2309 | * append-at-start-of-list which makes the allocation logic | ||
2310 | * _much_ simpler. */ | ||
2311 | sbi->s_rsv_window_head.rsv_start = EXT4_RESERVE_WINDOW_NOT_ALLOCATED; | ||
2312 | sbi->s_rsv_window_head.rsv_end = EXT4_RESERVE_WINDOW_NOT_ALLOCATED; | ||
2313 | sbi->s_rsv_window_head.rsv_alloc_hit = 0; | ||
2314 | sbi->s_rsv_window_head.rsv_goal_size = 0; | ||
2315 | ext4_rsv_window_add(sb, &sbi->s_rsv_window_head); | ||
2316 | |||
2317 | sbi->s_stripe = ext4_get_stripe_size(sbi); | 2286 | sbi->s_stripe = ext4_get_stripe_size(sbi); |
2318 | 2287 | ||
2319 | /* | 2288 | /* |
@@ -2510,7 +2479,12 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
2510 | printk(KERN_INFO "EXT4-fs: delayed allocation enabled\n"); | 2479 | printk(KERN_INFO "EXT4-fs: delayed allocation enabled\n"); |
2511 | 2480 | ||
2512 | ext4_ext_init(sb); | 2481 | ext4_ext_init(sb); |
2513 | ext4_mb_init(sb, needs_recovery); | 2482 | err = ext4_mb_init(sb, needs_recovery); |
2483 | if (err) { | ||
2484 | printk(KERN_ERR "EXT4-fs: failed to initalize mballoc (%d)\n", | ||
2485 | err); | ||
2486 | goto failed_mount4; | ||
2487 | } | ||
2514 | 2488 | ||
2515 | lock_kernel(); | 2489 | lock_kernel(); |
2516 | return 0; | 2490 | return 0; |