• Home
  • Raw
  • Download

Lines Matching refs:root

77 int btrfs_find_root(struct btrfs_root *root, const struct btrfs_key *search_key,  in btrfs_find_root()  argument
86 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0); in btrfs_find_root()
132 *root, struct btrfs_key *key, struct btrfs_root_item in btrfs_update_root()
135 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_update_root()
147 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
155 root->root_key.objectid); in btrfs_update_root()
173 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
180 ret = btrfs_del_item(trans, root, path); in btrfs_update_root()
186 ret = btrfs_insert_empty_item(trans, root, path, in btrfs_update_root()
210 int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, in btrfs_insert_root() argument
217 return btrfs_insert_item(trans, root, key, item, sizeof(*item)); in btrfs_insert_root()
227 struct btrfs_root *root; in btrfs_find_orphan_roots() local
280 root = btrfs_lookup_fs_root(fs_info, root_key.objectid); in btrfs_find_orphan_roots()
281 if (root) { in btrfs_find_orphan_roots()
283 &root->state)); in btrfs_find_orphan_roots()
284 if (btrfs_root_refs(&root->root_item) == 0) in btrfs_find_orphan_roots()
285 btrfs_add_dead_root(root); in btrfs_find_orphan_roots()
289 root = btrfs_read_fs_root(tree_root, &root_key); in btrfs_find_orphan_roots()
290 err = PTR_ERR_OR_ZERO(root); in btrfs_find_orphan_roots()
316 err = btrfs_init_fs_root(root); in btrfs_find_orphan_roots()
318 btrfs_free_fs_root(root); in btrfs_find_orphan_roots()
322 set_bit(BTRFS_ROOT_ORPHAN_ITEM_INSERTED, &root->state); in btrfs_find_orphan_roots()
324 err = btrfs_insert_fs_root(fs_info, root); in btrfs_find_orphan_roots()
327 btrfs_free_fs_root(root); in btrfs_find_orphan_roots()
331 if (btrfs_root_refs(&root->root_item) == 0) in btrfs_find_orphan_roots()
332 btrfs_add_dead_root(root); in btrfs_find_orphan_roots()
343 struct btrfs_root *root = fs_info->tree_root; in btrfs_del_root() local
350 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
356 ret = btrfs_del_item(trans, root, path); in btrfs_del_root()
510 struct btrfs_root *root) in btrfs_update_root_times() argument
512 struct btrfs_root_item *item = &root->root_item; in btrfs_update_root_times()
516 spin_lock(&root->root_item_lock); in btrfs_update_root_times()
520 spin_unlock(&root->root_item_lock); in btrfs_update_root_times()