Lines Matching full:path
52 * path: the path we search
63 struct btrfs_path *path, struct btrfs_root_item *root_item, in btrfs_find_root() argument
71 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0); in btrfs_find_root()
80 if (path->slots[0] == 0) in btrfs_find_root()
82 path->slots[0]--; in btrfs_find_root()
86 l = path->nodes[0]; in btrfs_find_root()
87 slot = path->slots[0]; in btrfs_find_root()
101 btrfs_release_path(path); in btrfs_find_root()
121 struct btrfs_path *path; in btrfs_update_root() local
128 path = btrfs_alloc_path(); in btrfs_update_root()
129 if (!path) in btrfs_update_root()
132 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
146 l = path->nodes[0]; in btrfs_update_root()
147 slot = path->slots[0]; in btrfs_update_root()
157 btrfs_release_path(path); in btrfs_update_root()
158 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
165 ret = btrfs_del_item(trans, root, path); in btrfs_update_root()
170 btrfs_release_path(path); in btrfs_update_root()
171 ret = btrfs_insert_empty_item(trans, root, path, in btrfs_update_root()
177 l = path->nodes[0]; in btrfs_update_root()
178 slot = path->slots[0]; in btrfs_update_root()
189 btrfs_mark_buffer_dirty(path->nodes[0]); in btrfs_update_root()
191 btrfs_free_path(path); in btrfs_update_root()
209 struct btrfs_path *path; in btrfs_find_orphan_roots() local
215 path = btrfs_alloc_path(); in btrfs_find_orphan_roots()
216 if (!path) in btrfs_find_orphan_roots()
226 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in btrfs_find_orphan_roots()
232 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
233 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
234 ret = btrfs_next_leaf(tree_root, path); in btrfs_find_orphan_roots()
239 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
242 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
243 btrfs_release_path(path); in btrfs_find_orphan_roots()
259 btrfs_release_path(path); in btrfs_find_orphan_roots()
302 btrfs_free_path(path); in btrfs_find_orphan_roots()
311 struct btrfs_path *path; in btrfs_del_root() local
314 path = btrfs_alloc_path(); in btrfs_del_root()
315 if (!path) in btrfs_del_root()
317 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
323 ret = btrfs_del_item(trans, root, path); in btrfs_del_root()
325 btrfs_free_path(path); in btrfs_del_root()
335 struct btrfs_path *path; in btrfs_del_root_ref() local
342 path = btrfs_alloc_path(); in btrfs_del_root_ref()
343 if (!path) in btrfs_del_root_ref()
350 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1); in btrfs_del_root_ref()
354 leaf = path->nodes[0]; in btrfs_del_root_ref()
355 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
366 ret = btrfs_del_item(trans, tree_root, path); in btrfs_del_root_ref()
375 btrfs_release_path(path); in btrfs_del_root_ref()
383 btrfs_free_path(path); in btrfs_del_root_ref()
400 * Will return 0, -ENOMEM, or anything from the CoW path
409 struct btrfs_path *path; in btrfs_add_root_ref() local
414 path = btrfs_alloc_path(); in btrfs_add_root_ref()
415 if (!path) in btrfs_add_root_ref()
422 ret = btrfs_insert_empty_item(trans, tree_root, path, &key, in btrfs_add_root_ref()
426 btrfs_free_path(path); in btrfs_add_root_ref()
430 leaf = path->nodes[0]; in btrfs_add_root_ref()
431 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
440 btrfs_release_path(path); in btrfs_add_root_ref()
447 btrfs_free_path(path); in btrfs_add_root_ref()