diff options
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 8969fee23318..45bc3132b054 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1406,6 +1406,10 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1406 | fs_info->btree_inode->i_mapping, GFP_NOFS); | 1406 | fs_info->btree_inode->i_mapping, GFP_NOFS); |
1407 | fs_info->do_barriers = 1; | 1407 | fs_info->do_barriers = 1; |
1408 | 1408 | ||
1409 | extent_io_tree_init(&fs_info->reloc_mapping_tree, | ||
1410 | fs_info->btree_inode->i_mapping, GFP_NOFS); | ||
1411 | INIT_LIST_HEAD(&fs_info->dead_reloc_roots); | ||
1412 | btrfs_leaf_ref_tree_init(&fs_info->reloc_ref_tree); | ||
1409 | btrfs_leaf_ref_tree_init(&fs_info->shared_ref_tree); | 1413 | btrfs_leaf_ref_tree_init(&fs_info->shared_ref_tree); |
1410 | 1414 | ||
1411 | BTRFS_I(fs_info->btree_inode)->root = tree_root; | 1415 | BTRFS_I(fs_info->btree_inode)->root = tree_root; |
@@ -1421,6 +1425,7 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1421 | mutex_init(&fs_info->transaction_kthread_mutex); | 1425 | mutex_init(&fs_info->transaction_kthread_mutex); |
1422 | mutex_init(&fs_info->cleaner_mutex); | 1426 | mutex_init(&fs_info->cleaner_mutex); |
1423 | mutex_init(&fs_info->volume_mutex); | 1427 | mutex_init(&fs_info->volume_mutex); |
1428 | mutex_init(&fs_info->tree_reloc_mutex); | ||
1424 | init_waitqueue_head(&fs_info->transaction_throttle); | 1429 | init_waitqueue_head(&fs_info->transaction_throttle); |
1425 | init_waitqueue_head(&fs_info->transaction_wait); | 1430 | init_waitqueue_head(&fs_info->transaction_wait); |
1426 | init_waitqueue_head(&fs_info->async_submit_wait); | 1431 | init_waitqueue_head(&fs_info->async_submit_wait); |
@@ -1627,6 +1632,10 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1627 | ret = btrfs_recover_log_trees(log_tree_root); | 1632 | ret = btrfs_recover_log_trees(log_tree_root); |
1628 | BUG_ON(ret); | 1633 | BUG_ON(ret); |
1629 | } | 1634 | } |
1635 | |||
1636 | ret = btrfs_cleanup_reloc_trees(tree_root); | ||
1637 | BUG_ON(ret); | ||
1638 | |||
1630 | fs_info->last_trans_committed = btrfs_super_generation(disk_super); | 1639 | fs_info->last_trans_committed = btrfs_super_generation(disk_super); |
1631 | return tree_root; | 1640 | return tree_root; |
1632 | 1641 | ||