Lines Matching full:root

78  * map address of tree root to tree
131 /* map start of tree root to corresponding reloc tree */
180 * walk up backref nodes until reach node presents tree root
291 static bool reloc_root_is_dead(struct btrfs_root *root) in reloc_root_is_dead() argument
299 if (test_bit(BTRFS_ROOT_DEAD_RELOC_TREE, &root->state)) in reloc_root_is_dead()
308 * This is enough for most callers, as they don't distinguish dead reloc root
309 * from no reloc root. But btrfs_should_ignore_reloc_root() below is a
312 static bool have_reloc_root(struct btrfs_root *root) in have_reloc_root() argument
314 if (reloc_root_is_dead(root)) in have_reloc_root()
316 if (!root->reloc_root) in have_reloc_root()
321 int btrfs_should_ignore_reloc_root(struct btrfs_root *root) in btrfs_should_ignore_reloc_root() argument
325 if (!test_bit(BTRFS_ROOT_SHAREABLE, &root->state)) in btrfs_should_ignore_reloc_root()
328 /* This root has been merged with its reloc tree, we can ignore it */ in btrfs_should_ignore_reloc_root()
329 if (reloc_root_is_dead(root)) in btrfs_should_ignore_reloc_root()
332 reloc_root = root->reloc_root; in btrfs_should_ignore_reloc_root()
337 root->fs_info->running_transaction->transid) in btrfs_should_ignore_reloc_root()
342 * so backref node for the fs tree root is useless for in btrfs_should_ignore_reloc_root()
349 * find reloc tree by address of tree root
356 struct btrfs_root *root = NULL; in find_reloc_root() local
363 root = (struct btrfs_root *)node->data; in find_reloc_root()
366 return btrfs_grab_root(root); in find_reloc_root()
396 /* Only tree root nodes can be added to @useless_nodes */ in handle_useless_nodes()
444 * Build backref tree for a given tree block. Root of the backref tree
450 * these upper level blocks recursively. The recursion stops when tree root is
534 * corresponds to root of source tree
581 new_node->root = btrfs_grab_root(dest); in clone_backref_node()
582 ASSERT(new_node->root); in clone_backref_node()
621 * helper to add 'address of tree root -> reloc tree' mapping
623 static int __must_check __add_reloc_root(struct btrfs_root *root) in __add_reloc_root() argument
625 struct btrfs_fs_info *fs_info = root->fs_info; in __add_reloc_root()
634 node->bytenr = root->commit_root->start; in __add_reloc_root()
635 node->data = root; in __add_reloc_root()
643 "Duplicate root found for start=%llu while inserting into relocation tree", in __add_reloc_root()
648 list_add_tail(&root->root_list, &rc->reloc_roots); in __add_reloc_root()
653 * helper to delete the 'address of tree root -> reloc tree'
656 static void __del_reloc_root(struct btrfs_root *root) in __del_reloc_root() argument
658 struct btrfs_fs_info *fs_info = root->fs_info; in __del_reloc_root()
664 if (rc && root->node) { in __del_reloc_root()
667 root->commit_root->start); in __del_reloc_root()
674 ASSERT(!node || (struct btrfs_root *)node->data == root); in __del_reloc_root()
678 * We only put the reloc root here if it's on the list. There's a lot in __del_reloc_root()
680 * the reloc roots, and then add the reloc root back onto in __del_reloc_root()
686 if (!list_empty(&root->root_list)) { in __del_reloc_root()
688 list_del_init(&root->root_list); in __del_reloc_root()
692 btrfs_put_root(root); in __del_reloc_root()
697 * helper to update the 'address of tree root -> reloc tree'
700 static int __update_reloc_root(struct btrfs_root *root) in __update_reloc_root() argument
702 struct btrfs_fs_info *fs_info = root->fs_info; in __update_reloc_root()
709 root->commit_root->start); in __update_reloc_root()
718 BUG_ON((struct btrfs_root *)node->data != root); in __update_reloc_root()
721 node->bytenr = root->node->start; in __update_reloc_root()
731 struct btrfs_root *root, u64 objectid) in create_reloc_root() argument
733 struct btrfs_fs_info *fs_info = root->fs_info; in create_reloc_root()
749 if (root->root_key.objectid == objectid) { in create_reloc_root()
753 ret = btrfs_copy_root(trans, root, root->commit_root, &eb, in create_reloc_root()
760 * root - like this ctree.c:btrfs_block_can_be_shared() behaves in create_reloc_root()
761 * correctly (returns true) when the relocation root is created in create_reloc_root()
766 commit_root_gen = btrfs_header_generation(root->commit_root); in create_reloc_root()
767 btrfs_set_root_last_snapshot(&root->root_item, commit_root_gen); in create_reloc_root()
776 ret = btrfs_copy_root(trans, root, root->node, &eb, in create_reloc_root()
788 memcpy(root_item, &root->root_item, sizeof(*root_item)); in create_reloc_root()
793 if (root->root_key.objectid == objectid) { in create_reloc_root()
828 * snapshot of the fs tree with special root objectid.
831 * root->reloc_root, and another for being on the rc->reloc_roots list.
834 struct btrfs_root *root) in btrfs_init_reloc_root() argument
836 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_init_reloc_root()
850 if (reloc_root_is_dead(root)) in btrfs_init_reloc_root()
856 * corresponding fs root, and then here we update the last trans for the in btrfs_init_reloc_root()
857 * reloc root. This means that we have to do this for the entire life in btrfs_init_reloc_root()
858 * of the reloc root, regardless of which stage of the relocation we are in btrfs_init_reloc_root()
861 if (root->reloc_root) { in btrfs_init_reloc_root()
862 reloc_root = root->reloc_root; in btrfs_init_reloc_root()
872 root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID) in btrfs_init_reloc_root()
880 reloc_root = create_reloc_root(trans, root, root->root_key.objectid); in btrfs_init_reloc_root()
893 root->reloc_root = btrfs_grab_root(reloc_root); in btrfs_init_reloc_root()
898 * update root item of reloc tree
901 struct btrfs_root *root) in btrfs_update_reloc_root() argument
903 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_update_reloc_root()
908 if (!have_reloc_root(root)) in btrfs_update_reloc_root()
911 reloc_root = root->reloc_root; in btrfs_update_reloc_root()
916 * the root. We have the ref for root->reloc_root, but just in case in btrfs_update_reloc_root()
917 * hold it while we update the reloc root. in btrfs_update_reloc_root()
921 /* root->reloc_root will stay until current relocation finished */ in btrfs_update_reloc_root()
924 set_bit(BTRFS_ROOT_DEAD_RELOC_TREE, &root->state); in btrfs_update_reloc_root()
950 static struct inode *find_next_inode(struct btrfs_root *root, u64 objectid) in find_next_inode() argument
957 spin_lock(&root->inode_lock); in find_next_inode()
959 node = root->inode_tree.rb_node; in find_next_inode()
986 spin_unlock(&root->inode_lock); in find_next_inode()
991 if (cond_resched_lock(&root->inode_lock)) in find_next_inode()
996 spin_unlock(&root->inode_lock); in find_next_inode()
1006 struct btrfs_root *root = BTRFS_I(reloc_inode)->root; in get_new_location() local
1017 ret = btrfs_lookup_file_extent(NULL, root, path, in get_new_location()
1054 struct btrfs_root *root, in replace_file_extents() argument
1057 struct btrfs_fs_info *fs_info = root->fs_info; in replace_file_extents()
1076 if (root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID) in replace_file_extents()
1105 if (root->root_key.objectid != BTRFS_TREE_RELOC_OBJECTID) { in replace_file_extents()
1107 inode = find_next_inode(root, key.objectid); in replace_file_extents()
1111 inode = find_next_inode(root, key.objectid); in replace_file_extents()
1148 ref.real_root = root->root_key.objectid; in replace_file_extents()
1159 ref.real_root = root->root_key.objectid; in replace_file_extents()
1347 * CoW on the subtree root node before transaction commit. in replace_path()
1421 int walk_up_reloc_tree(struct btrfs_root *root, struct btrfs_path *path, in walk_up_reloc_tree() argument
1429 last_snapshot = btrfs_root_last_snapshot(&root->root_item); in walk_up_reloc_tree()
1458 int walk_down_reloc_tree(struct btrfs_root *root, struct btrfs_path *path, in walk_down_reloc_tree() argument
1467 last_snapshot = btrfs_root_last_snapshot(&root->root_item); in walk_down_reloc_tree()
1503 static int invalidate_extent_cache(struct btrfs_root *root, in invalidate_extent_cache() argument
1507 struct btrfs_fs_info *fs_info = root->fs_info; in invalidate_extent_cache()
1521 inode = find_next_inode(root, objectid); in invalidate_extent_cache()
1595 struct btrfs_root *root) in insert_dirty_subvol() argument
1597 struct btrfs_root *reloc_root = root->reloc_root; in insert_dirty_subvol()
1601 /* @root must be a subvolume tree root with a valid reloc tree */ in insert_dirty_subvol()
1602 ASSERT(root->root_key.objectid != BTRFS_TREE_RELOC_OBJECTID); in insert_dirty_subvol()
1610 ret = btrfs_update_reloc_root(trans, root); in insert_dirty_subvol()
1614 if (list_empty(&root->reloc_dirty_list)) { in insert_dirty_subvol()
1615 btrfs_grab_root(root); in insert_dirty_subvol()
1616 list_add_tail(&root->reloc_dirty_list, &rc->dirty_subvol_roots); in insert_dirty_subvol()
1624 struct btrfs_root *root; in clean_dirty_subvols() local
1629 list_for_each_entry_safe(root, next, &rc->dirty_subvol_roots, in clean_dirty_subvols()
1631 if (root->root_key.objectid != BTRFS_TREE_RELOC_OBJECTID) { in clean_dirty_subvols()
1632 /* Merged subvolume, cleanup its reloc root */ in clean_dirty_subvols()
1633 struct btrfs_root *reloc_root = root->reloc_root; in clean_dirty_subvols()
1635 list_del_init(&root->reloc_dirty_list); in clean_dirty_subvols()
1636 root->reloc_root = NULL; in clean_dirty_subvols()
1639 * root->reloc_root = NULL. Pairs with have_reloc_root. in clean_dirty_subvols()
1642 clear_bit(BTRFS_ROOT_DEAD_RELOC_TREE, &root->state); in clean_dirty_subvols()
1656 btrfs_put_root(root); in clean_dirty_subvols()
1659 ret2 = btrfs_drop_snapshot(root, 0, 1); in clean_dirty_subvols()
1661 btrfs_put_root(root); in clean_dirty_subvols()
1675 struct btrfs_root *root) in merge_reloc_root() argument
1697 reloc_root = root->reloc_root; in merge_reloc_root()
1728 * block COW, we COW at most from level 1 to root level for each tree. in merge_reloc_root()
1738 ret = btrfs_block_rsv_refill(root, rc->block_rsv, min_reserved, in merge_reloc_root()
1742 trans = btrfs_start_transaction(root, 0); in merge_reloc_root()
1756 * btrfs_update_reloc_root() and update our root item in merge_reloc_root()
1775 ret = replace_path(trans, rc, root, reloc_root, path, in merge_reloc_root()
1794 * this is OK since root refs == 1 in this case. in merge_reloc_root()
1806 invalidate_extent_cache(root, &key, &next_key); in merge_reloc_root()
1811 * relocated and the block is tree root. in merge_reloc_root()
1813 leaf = btrfs_lock_root_node(root); in merge_reloc_root()
1814 ret = btrfs_cow_block(trans, root, leaf, NULL, 0, &leaf, in merge_reloc_root()
1822 ret = insert_dirty_subvol(trans, rc, root); in merge_reloc_root()
1833 invalidate_extent_cache(root, &key, &next_key); in merge_reloc_root()
1841 struct btrfs_root *root = rc->extent_root; in prepare_to_merge() local
1842 struct btrfs_fs_info *fs_info = root->fs_info; in prepare_to_merge()
1857 ret = btrfs_block_rsv_add(root, rc->block_rsv, num_bytes, in prepare_to_merge()
1887 root = btrfs_get_fs_root(fs_info, reloc_root->root_key.offset, in prepare_to_merge()
1889 if (IS_ERR(root)) { in prepare_to_merge()
1891 * Even if we have an error we need this reloc root in prepare_to_merge()
1895 btrfs_abort_transaction(trans, (int)PTR_ERR(root)); in prepare_to_merge()
1897 err = PTR_ERR(root); in prepare_to_merge()
1900 ASSERT(root->reloc_root == reloc_root); in prepare_to_merge()
1908 ret = btrfs_update_reloc_root(trans, root); in prepare_to_merge()
1911 * Even if we have an error we need this reloc root back on our in prepare_to_merge()
1915 btrfs_put_root(root); in prepare_to_merge()
1947 struct btrfs_root *root; in merge_reloc_roots() local
1953 root = rc->extent_root; in merge_reloc_roots()
1970 root = btrfs_get_fs_root(fs_info, reloc_root->root_key.offset, in merge_reloc_roots()
1973 if (IS_ERR(root)) { in merge_reloc_roots()
1976 * and if we didn't find the root then we marked in merge_reloc_roots()
1977 * the reloc root as a garbage root. For normal in merge_reloc_roots()
1978 * relocation obviously the root should exist in in merge_reloc_roots()
1983 ret = PTR_ERR(root); in merge_reloc_roots()
1986 if (root->reloc_root != reloc_root) { in merge_reloc_roots()
1996 ret = merge_reloc_root(rc, root); in merge_reloc_roots()
1997 btrfs_put_root(root); in merge_reloc_roots()
2005 if (!IS_ERR(root)) { in merge_reloc_roots()
2006 if (root->reloc_root == reloc_root) { in merge_reloc_roots()
2007 root->reloc_root = NULL; in merge_reloc_roots()
2011 &root->state); in merge_reloc_roots()
2012 btrfs_put_root(root); in merge_reloc_roots()
2016 /* Don't forget to queue this reloc root for cleanup */ in merge_reloc_roots()
2031 /* new reloc root may be added */ in merge_reloc_roots()
2046 * fine because we're bailing here, and we hold a reference on the root in merge_reloc_roots()
2048 * do the reloc_dirty_list afterwards. Meanwhile the root->reloc_root in merge_reloc_roots()
2070 struct btrfs_root *root; in record_reloc_root_in_trans() local
2076 root = btrfs_get_fs_root(fs_info, reloc_root->root_key.offset, false); in record_reloc_root_in_trans()
2079 * This should succeed, since we can't have a reloc root without having in record_reloc_root_in_trans()
2080 * already looked up the actual root and created the reloc root for this in record_reloc_root_in_trans()
2081 * root. in record_reloc_root_in_trans()
2084 * reloc root without a corresponding root this could return ENOENT. in record_reloc_root_in_trans()
2086 if (IS_ERR(root)) { in record_reloc_root_in_trans()
2088 return PTR_ERR(root); in record_reloc_root_in_trans()
2090 if (root->reloc_root != reloc_root) { in record_reloc_root_in_trans()
2093 "root %llu has two reloc roots associated with it", in record_reloc_root_in_trans()
2095 btrfs_put_root(root); in record_reloc_root_in_trans()
2098 ret = btrfs_record_root_in_trans(trans, root); in record_reloc_root_in_trans()
2099 btrfs_put_root(root); in record_reloc_root_in_trans()
2111 struct btrfs_root *root; in select_reloc_root() local
2119 root = next->root; in select_reloc_root()
2122 * If there is no root, then our references for this block are in select_reloc_root()
2124 * block that is owned by a root. in select_reloc_root()
2127 * non-SHAREABLE root then we have backrefs that resolve in select_reloc_root()
2133 if (!root) { in select_reloc_root()
2136 "bytenr %llu doesn't have a backref path ending in a root", in select_reloc_root()
2140 if (!test_bit(BTRFS_ROOT_SHAREABLE, &root->state)) { in select_reloc_root()
2143 "bytenr %llu has multiple refs with one ending in a non-shareable root", in select_reloc_root()
2148 if (root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID) { in select_reloc_root()
2149 ret = record_reloc_root_in_trans(trans, root); in select_reloc_root()
2155 ret = btrfs_record_root_in_trans(trans, root); in select_reloc_root()
2158 root = root->reloc_root; in select_reloc_root()
2162 * root->reloc_root may not be set, return ENOENT in this case. in select_reloc_root()
2164 if (!root) in select_reloc_root()
2167 if (next->new_bytenr != root->node->start) { in select_reloc_root()
2169 * We just created the reloc root, so we shouldn't have in select_reloc_root()
2184 next->new_bytenr = root->node->start; in select_reloc_root()
2185 btrfs_put_root(next->root); in select_reloc_root()
2186 next->root = btrfs_grab_root(root); in select_reloc_root()
2187 ASSERT(next->root); in select_reloc_root()
2195 root = NULL; in select_reloc_root()
2200 if (!root) { in select_reloc_root()
2217 return root; in select_reloc_root()
2221 * Select a tree root for relocation.
2226 * Return a tree root pointer if the block is shareable.
2227 * Return -ENOENT if the block is root of reloc tree.
2233 struct btrfs_root *root; in select_one_root() local
2242 root = next->root; in select_one_root()
2248 if (!root) in select_one_root()
2252 if (!test_bit(BTRFS_ROOT_SHAREABLE, &root->state)) in select_one_root()
2253 return root; in select_one_root()
2255 if (root->root_key.objectid != BTRFS_TREE_RELOC_OBJECTID) in select_one_root()
2256 fs_root = root; in select_one_root()
2309 struct btrfs_root *root = rc->extent_root; in reserve_metadata_space() local
2310 struct btrfs_fs_info *fs_info = root->fs_info; in reserve_metadata_space()
2325 ret = btrfs_block_rsv_refill(root, rc->block_rsv, num_bytes, in reserve_metadata_space()
2362 struct btrfs_root *root; in do_relocation() local
2383 root = select_reloc_root(trans, rc, upper, edges); in do_relocation()
2384 if (IS_ERR(root)) { in do_relocation()
2385 ret = PTR_ERR(root); in do_relocation()
2403 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in do_relocation()
2434 btrfs_err(root->fs_info, in do_relocation()
2446 blocksize = root->fs_info->nodesize; in do_relocation()
2455 ret = btrfs_cow_block(trans, root, eb, upper->eb, in do_relocation()
2476 ref.real_root = root->root_key.objectid; in do_relocation()
2481 ret = btrfs_drop_subtree(trans, root, eb, in do_relocation()
2623 struct btrfs_root *root; in relocate_tree_block() local
2638 root = select_one_root(node); in relocate_tree_block()
2639 if (IS_ERR(root)) { in relocate_tree_block()
2640 ret = PTR_ERR(root); in relocate_tree_block()
2651 if (root) { in relocate_tree_block()
2652 if (test_bit(BTRFS_ROOT_SHAREABLE, &root->state)) { in relocate_tree_block()
2654 * This block was the root block of a root, and this is in relocate_tree_block()
2669 btrfs_err(root->fs_info, in relocate_tree_block()
2675 ret = btrfs_record_root_in_trans(trans, root); in relocate_tree_block()
2682 if (!root->reloc_root) { in relocate_tree_block()
2686 root = root->reloc_root; in relocate_tree_block()
2687 node->new_bytenr = root->node->start; in relocate_tree_block()
2688 btrfs_put_root(node->root); in relocate_tree_block()
2689 node->root = btrfs_grab_root(root); in relocate_tree_block()
2690 ASSERT(node->root); in relocate_tree_block()
2694 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in relocate_tree_block()
2803 struct btrfs_fs_info *fs_info = inode->root->fs_info; in prealloc_file_extent_cluster()
2859 if (btrfs_is_zoned(inode->root->fs_info)) { in prealloc_file_extent_cluster()
2860 struct btrfs_root *root = inode->root; in prealloc_file_extent_cluster() local
2864 trans = btrfs_start_transaction(root, 1); in prealloc_file_extent_cluster()
2870 ret = btrfs_update_inode(trans, root, inode); in prealloc_file_extent_cluster()
2901 btrfs_free_reserved_data_space_noquota(inode->root->fs_info, in prealloc_file_extent_cluster()
3200 * inline ref offset. We know it's an fs root if in add_tree_block()
3334 struct btrfs_root *root = fs_info->tree_root; in delete_block_group_cache() local
3341 inode = btrfs_iget(fs_info->sb, ino, root); in delete_block_group_cache()
3351 trans = btrfs_join_transaction(root); in delete_block_group_cache()
3367 * Locate the free space cache EXTENT_DATA in root tree leaf and delete the
3768 struct btrfs_root *root, u64 objectid) in __insert_orphan_inode() argument
3783 ret = btrfs_insert_empty_inode(trans, root, path, objectid); in __insert_orphan_inode()
3801 struct btrfs_root *root, u64 objectid) in delete_orphan_inode() argument
3816 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in delete_orphan_inode()
3822 ret = btrfs_del_item(trans, root, path); in delete_orphan_inode()
3839 struct btrfs_root *root; in create_reloc_inode() local
3843 root = btrfs_grab_root(fs_info->data_reloc_root); in create_reloc_inode()
3844 trans = btrfs_start_transaction(root, 6); in create_reloc_inode()
3846 btrfs_put_root(root); in create_reloc_inode()
3850 err = btrfs_get_free_objectid(root, &objectid); in create_reloc_inode()
3854 err = __insert_orphan_inode(trans, root, objectid); in create_reloc_inode()
3858 inode = btrfs_iget(fs_info->sb, objectid, root); in create_reloc_inode()
3860 delete_orphan_inode(trans, root, objectid); in create_reloc_inode()
3869 btrfs_put_root(root); in create_reloc_inode()
4119 static noinline_for_stack int mark_garbage_root(struct btrfs_root *root) in mark_garbage_root() argument
4121 struct btrfs_fs_info *fs_info = root->fs_info; in mark_garbage_root()
4129 memset(&root->root_item.drop_progress, 0, in mark_garbage_root()
4130 sizeof(root->root_item.drop_progress)); in mark_garbage_root()
4131 btrfs_set_root_drop_level(&root->root_item, 0); in mark_garbage_root()
4132 btrfs_set_root_refs(&root->root_item, 0); in mark_garbage_root()
4134 &root->root_key, &root->root_item); in mark_garbage_root()
4148 int btrfs_recover_relocation(struct btrfs_root *root) in btrfs_recover_relocation() argument
4150 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_recover_relocation()
4191 reloc_root = btrfs_read_tree_root(root, &key); in btrfs_recover_relocation()
4331 struct btrfs_fs_info *fs_info = inode->root->fs_info; in btrfs_reloc_clone_csums()
4375 struct btrfs_root *root, struct extent_buffer *buf, in btrfs_reloc_cow_block() argument
4378 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_reloc_cow_block()
4390 root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID); in btrfs_reloc_cow_block()
4394 btrfs_root_last_snapshot(&root->root_item)) in btrfs_reloc_cow_block()
4397 if (root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID && in btrfs_reloc_cow_block()
4424 ret = replace_file_extents(trans, rc, root, cow); in btrfs_reloc_cow_block()
4435 struct btrfs_root *root = pending->root; in btrfs_reloc_pre_snapshot() local
4436 struct reloc_control *rc = root->fs_info->reloc_ctl; in btrfs_reloc_pre_snapshot()
4438 if (!rc || !have_reloc_root(root)) in btrfs_reloc_pre_snapshot()
4444 root = root->reloc_root; in btrfs_reloc_pre_snapshot()
4445 BUG_ON(btrfs_root_refs(&root->root_item) == 0); in btrfs_reloc_pre_snapshot()
4461 * and create reloc root for the newly created snapshot
4464 * references held on the reloc_root, one for root->reloc_root and one for
4470 struct btrfs_root *root = pending->root; in btrfs_reloc_post_snapshot() local
4473 struct reloc_control *rc = root->fs_info->reloc_ctl; in btrfs_reloc_post_snapshot()
4476 if (!rc || !have_reloc_root(root)) in btrfs_reloc_post_snapshot()
4479 rc = root->fs_info->reloc_ctl; in btrfs_reloc_post_snapshot()
4491 reloc_root = create_reloc_root(trans, root->reloc_root, in btrfs_reloc_post_snapshot()
4506 ret = clone_backref_node(trans, rc, root, reloc_root); in btrfs_reloc_post_snapshot()