Skip to content

Commit

Permalink
Btrfs: Replace extent tree preallocation code with some bit radix magic.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason authored and David Woodhouse committed Aug 9, 2007
1 parent f4468e9 commit 26b8003
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 195 deletions.
7 changes: 1 addition & 6 deletions fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,7 @@ struct btrfs_fs_info {
struct radix_tree_root block_group_radix;
struct radix_tree_root block_group_data_radix;
struct radix_tree_root extent_map_radix;

u64 extent_tree_insert[BTRFS_MAX_LEVEL * 6];
int extent_tree_insert_nr;
u64 extent_tree_prealloc[BTRFS_MAX_LEVEL * 6];
int extent_tree_prealloc_nr;

struct radix_tree_root extent_ins_radix;
u64 generation;
struct btrfs_transaction *running_transaction;
struct btrfs_super_block *disk_super;
Expand Down
3 changes: 1 addition & 2 deletions fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
Loading

0 comments on commit 26b8003

Please sign in to comment.