Btrfs: Replace extent tree preallocation code with some bit radix magic.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason
2007-08-08 20:17:12 -04:00
committed by David Woodhouse
parent f4468e94c8
commit 26b8003f10
5 changed files with 49 additions and 195 deletions

View File

@@ -427,6 +427,7 @@ struct btrfs_root *open_ctree(struct super_block *sb)
init_bit_radix(&fs_info->pinned_radix);
init_bit_radix(&fs_info->pending_del_radix);
init_bit_radix(&fs_info->extent_map_radix);
init_bit_radix(&fs_info->extent_ins_radix);
INIT_RADIX_TREE(&fs_info->fs_roots_radix, GFP_NOFS);
INIT_RADIX_TREE(&fs_info->block_group_radix, GFP_KERNEL);
INIT_RADIX_TREE(&fs_info->block_group_data_radix, GFP_KERNEL);
@@ -443,8 +444,6 @@ struct btrfs_root *open_ctree(struct super_block *sb)
fs_info->btree_inode->i_size = sb->s_bdev->bd_inode->i_size;
fs_info->btree_inode->i_mapping->a_ops = &btree_aops;
fs_info->do_barriers = 1;
fs_info->extent_tree_insert_nr = 0;
fs_info->extent_tree_prealloc_nr = 0;
fs_info->closing = 0;
INIT_DELAYED_WORK(&fs_info->trans_work, btrfs_transaction_cleaner);