Lines Matching refs:tree_root

1182 	struct btrfs_root *tree_root = fs_info->tree_root;  in btrfs_create_tree()  local
1236 ret = btrfs_insert_root(trans, tree_root, &key, &root->root_item); in btrfs_create_tree()
1357 static struct btrfs_root *read_tree_root_path(struct btrfs_root *tree_root, in read_tree_root_path() argument
1362 struct btrfs_fs_info *fs_info = tree_root->fs_info; in read_tree_root_path()
1371 ret = btrfs_find_root(tree_root, key, path, in read_tree_root_path()
1417 struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root, in btrfs_read_tree_root() argument
1426 root = read_tree_root_path(tree_root, path, key); in btrfs_read_tree_root()
1514 return btrfs_grab_root(fs_info->tree_root); in btrfs_get_global_root()
1607 btrfs_put_root(fs_info->tree_root); in btrfs_free_fs_info()
1669 root = btrfs_read_tree_root(fs_info->tree_root, &key); in btrfs_get_root_ref()
1691 ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, path, 0, 0); in btrfs_get_root_ref()
1787 root = read_tree_root_path(fs_info->tree_root, path, &key); in btrfs_get_fs_root_commit_root()
1975 btrfs_set_backup_tree_root(root_backup, info->tree_root->node->start); in backup_super_roots()
1977 btrfs_header_generation(info->tree_root->node)); in backup_super_roots()
1980 btrfs_header_level(info->tree_root->node)); in backup_super_roots()
2140 free_root_extent_buffers(info->tree_root); in free_root_pointers()
2227 fs_info->tree_root); in btrfs_init_btree_inode()
2244 BTRFS_I(inode)->root = btrfs_grab_root(fs_info->tree_root); in btrfs_init_btree_inode()
2410 static int load_global_roots_objectid(struct btrfs_root *tree_root, in load_global_roots_objectid() argument
2414 struct btrfs_fs_info *fs_info = tree_root->fs_info; in load_global_roots_objectid()
2433 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in load_global_roots_objectid()
2438 ret = btrfs_next_leaf(tree_root, path); in load_global_roots_objectid()
2460 root = read_tree_root_path(tree_root, path, &key); in load_global_roots_objectid()
2492 static int load_global_roots(struct btrfs_root *tree_root) in load_global_roots() argument
2501 ret = load_global_roots_objectid(tree_root, path, in load_global_roots()
2505 ret = load_global_roots_objectid(tree_root, path, in load_global_roots()
2509 if (!btrfs_fs_compat_ro(tree_root->fs_info, FREE_SPACE_TREE)) in load_global_roots()
2511 ret = load_global_roots_objectid(tree_root, path, in load_global_roots()
2521 struct btrfs_root *tree_root = fs_info->tree_root; in btrfs_read_roots() local
2526 BUG_ON(!fs_info->tree_root); in btrfs_read_roots()
2528 ret = load_global_roots(tree_root); in btrfs_read_roots()
2537 root = btrfs_read_tree_root(tree_root, &location); in btrfs_read_roots()
2550 root = btrfs_read_tree_root(tree_root, &location); in btrfs_read_roots()
2569 root = btrfs_get_fs_root(tree_root->fs_info, in btrfs_read_roots()
2582 root = btrfs_read_tree_root(tree_root, &location); in btrfs_read_roots()
2590 root = btrfs_read_tree_root(tree_root, &location); in btrfs_read_roots()
2886 ret = load_super_root(fs_info->tree_root, bytenr, gen, level); in load_important_roots()
2898 struct btrfs_root *tree_root = fs_info->tree_root; in init_tree_roots() local
2905 if (!IS_ERR(tree_root->node)) in init_tree_roots()
2906 free_extent_buffer(tree_root->node); in init_tree_roots()
2907 tree_root->node = NULL; in init_tree_roots()
2939 ret = btrfs_init_root_free_objectid(tree_root); in init_tree_roots()
2945 ASSERT(tree_root->free_objectid <= BTRFS_LAST_FREE_OBJECTID); in init_tree_roots()
2954 fs_info->generation = btrfs_header_generation(tree_root->node); in init_tree_roots()
3246 (ret = btrfs_orphan_cleanup(fs_info->tree_root))) { in btrfs_start_pre_rw_mount()
3422 struct btrfs_root *tree_root; in open_ctree() local
3435 tree_root = btrfs_alloc_root(fs_info, BTRFS_ROOT_TREE_OBJECTID, in open_ctree()
3437 fs_info->tree_root = tree_root; in open_ctree()
3441 if (!tree_root || !chunk_root) { in open_ctree()
3744 tree_root, in open_ctree()
4493 struct btrfs_root *root = fs_info->tree_root; in btrfs_commit_super()