diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-04-26 16:46:15 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-04-26 16:46:15 -0400 |
commit | 9078a3e1e4e489dddc636c7bb8780349d4298743 (patch) | |
tree | 98597a438d60fc8722c7562b79cecaa303b4721d /fs/btrfs/disk-io.c | |
parent | f2458e1d8c90958ed3631654cb7fd5ab01478505 (diff) |
Btrfs: start of block group code
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 956727f015a5..1c27eb645510 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -529,6 +529,7 @@ struct btrfs_root *open_ctree(struct super_block *sb) | |||
529 | init_bit_radix(&fs_info->pending_del_radix); | 529 | init_bit_radix(&fs_info->pending_del_radix); |
530 | INIT_RADIX_TREE(&fs_info->fs_roots_radix, GFP_NOFS); | 530 | INIT_RADIX_TREE(&fs_info->fs_roots_radix, GFP_NOFS); |
531 | INIT_RADIX_TREE(&fs_info->dev_radix, GFP_NOFS); | 531 | INIT_RADIX_TREE(&fs_info->dev_radix, GFP_NOFS); |
532 | INIT_RADIX_TREE(&fs_info->block_group_radix, GFP_KERNEL); | ||
532 | INIT_LIST_HEAD(&fs_info->trans_list); | 533 | INIT_LIST_HEAD(&fs_info->trans_list); |
533 | sb_set_blocksize(sb, 4096); | 534 | sb_set_blocksize(sb, 4096); |
534 | fs_info->running_transaction = NULL; | 535 | fs_info->running_transaction = NULL; |
@@ -613,6 +614,8 @@ struct btrfs_root *open_ctree(struct super_block *sb) | |||
613 | BTRFS_EXTENT_TREE_OBJECTID, extent_root); | 614 | BTRFS_EXTENT_TREE_OBJECTID, extent_root); |
614 | BUG_ON(ret); | 615 | BUG_ON(ret); |
615 | 616 | ||
617 | btrfs_read_block_groups(extent_root); | ||
618 | |||
616 | fs_info->generation = btrfs_super_generation(disk_super) + 1; | 619 | fs_info->generation = btrfs_super_generation(disk_super) + 1; |
617 | memset(&fs_info->kobj, 0, sizeof(fs_info->kobj)); | 620 | memset(&fs_info->kobj, 0, sizeof(fs_info->kobj)); |
618 | kobj_set_kset_s(fs_info, btrfs_subsys); | 621 | kobj_set_kset_s(fs_info, btrfs_subsys); |
@@ -741,6 +744,7 @@ int close_ctree(struct btrfs_root *root) | |||
741 | iput(fs_info->btree_inode); | 744 | iput(fs_info->btree_inode); |
742 | 745 | ||
743 | free_dev_radix(fs_info); | 746 | free_dev_radix(fs_info); |
747 | btrfs_free_block_groups(root->fs_info); | ||
744 | del_fs_roots(fs_info); | 748 | del_fs_roots(fs_info); |
745 | kfree(fs_info->extent_root); | 749 | kfree(fs_info->extent_root); |
746 | kfree(fs_info->tree_root); | 750 | kfree(fs_info->tree_root); |