aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 3e62a1b0a1f..2775e270881 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -604,6 +604,7 @@ struct btrfs_fs_info {
604 struct mutex chunk_mutex; 604 struct mutex chunk_mutex;
605 struct mutex drop_mutex; 605 struct mutex drop_mutex;
606 struct mutex volume_mutex; 606 struct mutex volume_mutex;
607 struct mutex tree_reloc_mutex;
607 struct list_head trans_list; 608 struct list_head trans_list;
608 struct list_head hashers; 609 struct list_head hashers;
609 struct list_head dead_roots; 610 struct list_head dead_roots;
@@ -647,6 +648,10 @@ struct btrfs_fs_info {
647 struct task_struct *cleaner_kthread; 648 struct task_struct *cleaner_kthread;
648 int thread_pool_size; 649 int thread_pool_size;
649 650
651 /* tree relocation relocated fields */
652 struct extent_io_tree reloc_mapping_tree;
653 struct list_head dead_reloc_roots;
654 struct btrfs_leaf_ref_tree reloc_ref_tree;
650 struct btrfs_leaf_ref_tree shared_ref_tree; 655 struct btrfs_leaf_ref_tree shared_ref_tree;
651 656
652 struct kobject super_kobj; 657 struct kobject super_kobj;
@@ -698,6 +703,7 @@ struct btrfs_root {
698 struct btrfs_leaf_ref_tree ref_tree_struct; 703 struct btrfs_leaf_ref_tree ref_tree_struct;
699 struct btrfs_dirty_root *dirty_root; 704 struct btrfs_dirty_root *dirty_root;
700 struct btrfs_root *log_root; 705 struct btrfs_root *log_root;
706 struct btrfs_root *reloc_root;
701 707
702 struct btrfs_root_item root_item; 708 struct btrfs_root_item root_item;
703 struct btrfs_key root_key; 709 struct btrfs_key root_key;
@@ -1517,7 +1523,6 @@ struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
1517struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans, 1523struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans,
1518 struct btrfs_root *root, 1524 struct btrfs_root *root,
1519 u64 bytenr, u32 blocksize); 1525 u64 bytenr, u32 blocksize);
1520int btrfs_shrink_extent_tree(struct btrfs_root *root, u64 new_size);
1521int btrfs_insert_extent_backref(struct btrfs_trans_handle *trans, 1526int btrfs_insert_extent_backref(struct btrfs_trans_handle *trans,
1522 struct btrfs_root *root, 1527 struct btrfs_root *root,
1523 struct btrfs_path *path, 1528 struct btrfs_path *path,
@@ -1582,10 +1587,29 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans,
1582 struct btrfs_root *root, u64 bytes_used, 1587 struct btrfs_root *root, u64 bytes_used,
1583 u64 type, u64 chunk_objectid, u64 chunk_offset, 1588 u64 type, u64 chunk_objectid, u64 chunk_offset,
1584 u64 size); 1589 u64 size);
1590int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
1591 struct btrfs_root *root, u64 group_start);
1592int btrfs_relocate_block_group(struct btrfs_root *root, u64 group_start);
1593int btrfs_free_reloc_root(struct btrfs_root *root);
1594int btrfs_drop_dead_reloc_roots(struct btrfs_root *root);
1595int btrfs_add_reloc_mapping(struct btrfs_root *root, u64 orig_bytenr,
1596 u64 num_bytes, u64 new_bytenr);
1597int btrfs_get_reloc_mapping(struct btrfs_root *root, u64 orig_bytenr,
1598 u64 num_bytes, u64 *new_bytenr);
1599void btrfs_free_reloc_mappings(struct btrfs_root *root);
1600int btrfs_reloc_tree_cache_ref(struct btrfs_trans_handle *trans,
1601 struct btrfs_root *root,
1602 struct extent_buffer *buf, u64 orig_start);
1603int btrfs_add_dead_reloc_root(struct btrfs_root *root);
1604int btrfs_cleanup_reloc_trees(struct btrfs_root *root);
1585/* ctree.c */ 1605/* ctree.c */
1586int btrfs_previous_item(struct btrfs_root *root, 1606int btrfs_previous_item(struct btrfs_root *root,
1587 struct btrfs_path *path, u64 min_objectid, 1607 struct btrfs_path *path, u64 min_objectid,
1588 int type); 1608 int type);
1609int btrfs_merge_path(struct btrfs_trans_handle *trans,
1610 struct btrfs_root *root,
1611 struct btrfs_key *node_keys,
1612 u64 *nodes, int lowest_level);
1589int btrfs_set_item_key_safe(struct btrfs_trans_handle *trans, 1613int btrfs_set_item_key_safe(struct btrfs_trans_handle *trans,
1590 struct btrfs_root *root, struct btrfs_path *path, 1614 struct btrfs_root *root, struct btrfs_path *path,
1591 struct btrfs_key *new_key); 1615 struct btrfs_key *new_key);