• Home
  • Raw
  • Download

Lines Matching refs:path

65 		    struct btrfs_path *path, struct btrfs_root_item *root_item,  in btrfs_find_root()  argument
73 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0); in btrfs_find_root()
82 if (path->slots[0] == 0) in btrfs_find_root()
84 path->slots[0]--; in btrfs_find_root()
88 l = path->nodes[0]; in btrfs_find_root()
89 slot = path->slots[0]; in btrfs_find_root()
103 btrfs_release_path(path); in btrfs_find_root()
123 struct btrfs_path *path; in btrfs_update_root() local
130 path = btrfs_alloc_path(); in btrfs_update_root()
131 if (!path) in btrfs_update_root()
134 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
148 l = path->nodes[0]; in btrfs_update_root()
149 slot = path->slots[0]; in btrfs_update_root()
159 btrfs_release_path(path); in btrfs_update_root()
160 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
167 ret = btrfs_del_item(trans, root, path); in btrfs_update_root()
172 btrfs_release_path(path); in btrfs_update_root()
173 ret = btrfs_insert_empty_item(trans, root, path, in btrfs_update_root()
179 l = path->nodes[0]; in btrfs_update_root()
180 slot = path->slots[0]; in btrfs_update_root()
191 btrfs_mark_buffer_dirty(path->nodes[0]); in btrfs_update_root()
193 btrfs_free_path(path); in btrfs_update_root()
211 struct btrfs_path *path; in btrfs_find_orphan_roots() local
217 path = btrfs_alloc_path(); in btrfs_find_orphan_roots()
218 if (!path) in btrfs_find_orphan_roots()
228 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in btrfs_find_orphan_roots()
234 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
235 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
236 ret = btrfs_next_leaf(tree_root, path); in btrfs_find_orphan_roots()
241 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
244 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
245 btrfs_release_path(path); in btrfs_find_orphan_roots()
261 btrfs_release_path(path); in btrfs_find_orphan_roots()
289 btrfs_free_path(path); in btrfs_find_orphan_roots()
298 struct btrfs_path *path; in btrfs_del_root() local
301 path = btrfs_alloc_path(); in btrfs_del_root()
302 if (!path) in btrfs_del_root()
304 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
310 ret = btrfs_del_item(trans, root, path); in btrfs_del_root()
312 btrfs_free_path(path); in btrfs_del_root()
322 struct btrfs_path *path; in btrfs_del_root_ref() local
330 path = btrfs_alloc_path(); in btrfs_del_root_ref()
331 if (!path) in btrfs_del_root_ref()
338 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1); in btrfs_del_root_ref()
343 leaf = path->nodes[0]; in btrfs_del_root_ref()
344 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
355 ret = btrfs_del_item(trans, tree_root, path); in btrfs_del_root_ref()
364 btrfs_release_path(path); in btrfs_del_root_ref()
372 btrfs_free_path(path); in btrfs_del_root_ref()
398 struct btrfs_path *path; in btrfs_add_root_ref() local
403 path = btrfs_alloc_path(); in btrfs_add_root_ref()
404 if (!path) in btrfs_add_root_ref()
411 ret = btrfs_insert_empty_item(trans, tree_root, path, &key, in btrfs_add_root_ref()
415 btrfs_free_path(path); in btrfs_add_root_ref()
419 leaf = path->nodes[0]; in btrfs_add_root_ref()
420 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
429 btrfs_release_path(path); in btrfs_add_root_ref()
436 btrfs_free_path(path); in btrfs_add_root_ref()