aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 05f26acfd070..574594cf6b51 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -903,6 +903,7 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
903 root->name = NULL; 903 root->name = NULL;
904 root->in_sysfs = 0; 904 root->in_sysfs = 0;
905 root->inode_tree = RB_ROOT; 905 root->inode_tree = RB_ROOT;
906 root->block_rsv = NULL;
906 907
907 INIT_LIST_HEAD(&root->dirty_list); 908 INIT_LIST_HEAD(&root->dirty_list);
908 INIT_LIST_HEAD(&root->orphan_list); 909 INIT_LIST_HEAD(&root->orphan_list);
@@ -910,6 +911,7 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
910 spin_lock_init(&root->node_lock); 911 spin_lock_init(&root->node_lock);
911 spin_lock_init(&root->list_lock); 912 spin_lock_init(&root->list_lock);
912 spin_lock_init(&root->inode_lock); 913 spin_lock_init(&root->inode_lock);
914 spin_lock_init(&root->accounting_lock);
913 mutex_init(&root->objectid_mutex); 915 mutex_init(&root->objectid_mutex);
914 mutex_init(&root->log_mutex); 916 mutex_init(&root->log_mutex);
915 init_waitqueue_head(&root->log_writer_wait); 917 init_waitqueue_head(&root->log_writer_wait);
@@ -1620,6 +1622,13 @@ struct btrfs_root *open_ctree(struct super_block *sb,
1620 INIT_LIST_HEAD(&fs_info->dirty_cowonly_roots); 1622 INIT_LIST_HEAD(&fs_info->dirty_cowonly_roots);
1621 INIT_LIST_HEAD(&fs_info->space_info); 1623 INIT_LIST_HEAD(&fs_info->space_info);
1622 btrfs_mapping_init(&fs_info->mapping_tree); 1624 btrfs_mapping_init(&fs_info->mapping_tree);
1625 btrfs_init_block_rsv(&fs_info->global_block_rsv);
1626 btrfs_init_block_rsv(&fs_info->delalloc_block_rsv);
1627 btrfs_init_block_rsv(&fs_info->trans_block_rsv);
1628 btrfs_init_block_rsv(&fs_info->chunk_block_rsv);
1629 btrfs_init_block_rsv(&fs_info->empty_block_rsv);
1630 INIT_LIST_HEAD(&fs_info->durable_block_rsv_list);
1631 mutex_init(&fs_info->durable_block_rsv_mutex);
1623 atomic_set(&fs_info->nr_async_submits, 0); 1632 atomic_set(&fs_info->nr_async_submits, 0);
1624 atomic_set(&fs_info->async_delalloc_pages, 0); 1633 atomic_set(&fs_info->async_delalloc_pages, 0);
1625 atomic_set(&fs_info->async_submit_draining, 0); 1634 atomic_set(&fs_info->async_submit_draining, 0);