Lines Matching refs:tree_root
1252 struct btrfs_root *tree_root = fs_info->tree_root; in btrfs_create_tree() local
1304 ret = btrfs_insert_root(trans, tree_root, &key, &root->root_item); in btrfs_create_tree()
1407 static struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root, in btrfs_read_tree_root() argument
1411 struct btrfs_fs_info *fs_info = tree_root->fs_info; in btrfs_read_tree_root()
1429 ret = btrfs_find_root(tree_root, key, path, in btrfs_read_tree_root()
1462 struct btrfs_root *btrfs_read_fs_root(struct btrfs_root *tree_root, in btrfs_read_fs_root() argument
1467 root = btrfs_read_tree_root(tree_root, location); in btrfs_read_fs_root()
1575 return fs_info->tree_root; in btrfs_get_fs_root()
1601 root = btrfs_read_fs_root(fs_info->tree_root, location); in btrfs_get_fs_root()
1623 ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, path, 0, 0); in btrfs_get_fs_root()
1887 btrfs_header_generation(info->tree_root->node)) in backup_super_roots()
1900 btrfs_set_backup_tree_root(root_backup, info->tree_root->node->start); in backup_super_roots()
1902 btrfs_header_generation(info->tree_root->node)); in backup_super_roots()
1905 btrfs_header_level(info->tree_root->node)); in backup_super_roots()
2053 free_root_extent_buffers(info->tree_root); in free_root_pointers()
2143 BTRFS_I(inode)->root = fs_info->tree_root; in btrfs_init_btree_inode()
2316 struct btrfs_root *tree_root = fs_info->tree_root; in btrfs_read_roots() local
2321 BUG_ON(!fs_info->tree_root); in btrfs_read_roots()
2327 root = btrfs_read_tree_root(tree_root, &location); in btrfs_read_roots()
2336 root = btrfs_read_tree_root(tree_root, &location); in btrfs_read_roots()
2346 root = btrfs_read_tree_root(tree_root, &location); in btrfs_read_roots()
2355 root = btrfs_read_tree_root(tree_root, &location); in btrfs_read_roots()
2363 root = btrfs_read_tree_root(tree_root, &location); in btrfs_read_roots()
2375 root = btrfs_read_tree_root(tree_root, &location); in btrfs_read_roots()
2609 struct btrfs_root *tree_root; in open_ctree() local
2618 tree_root = fs_info->tree_root = btrfs_alloc_root(fs_info, GFP_KERNEL); in open_ctree()
2620 if (!tree_root || !chunk_root) { in open_ctree()
2784 __setup_root(tree_root, fs_info, BTRFS_ROOT_TREE_OBJECTID); in open_ctree()
3006 tree_root->node = read_tree_block(fs_info, in open_ctree()
3009 if (IS_ERR(tree_root->node) || in open_ctree()
3010 !extent_buffer_uptodate(tree_root->node)) { in open_ctree()
3012 if (!IS_ERR(tree_root->node)) in open_ctree()
3013 free_extent_buffer(tree_root->node); in open_ctree()
3014 tree_root->node = NULL; in open_ctree()
3018 btrfs_set_root_node(&tree_root->root_item, tree_root->node); in open_ctree()
3019 tree_root->commit_root = btrfs_root_node(tree_root); in open_ctree()
3020 btrfs_set_root_refs(&tree_root->root_item, 1); in open_ctree()
3022 mutex_lock(&tree_root->objectid_mutex); in open_ctree()
3023 ret = btrfs_find_highest_objectid(tree_root, in open_ctree()
3024 &tree_root->highest_objectid); in open_ctree()
3026 mutex_unlock(&tree_root->objectid_mutex); in open_ctree()
3030 ASSERT(tree_root->highest_objectid <= BTRFS_LAST_FREE_OBJECTID); in open_ctree()
3032 mutex_unlock(&tree_root->objectid_mutex); in open_ctree()
3119 fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root, in open_ctree()
3125 tree_root, in open_ctree()
3182 ret = btrfs_recover_relocation(tree_root); in open_ctree()
3241 (ret = btrfs_orphan_cleanup(fs_info->tree_root))) { in open_ctree()
3944 struct btrfs_root *root = fs_info->tree_root; in btrfs_commit_super()
4598 trace_btrfs_transaction_commit(fs_info->tree_root); in btrfs_cleanup_transaction()