Lines Matching defs:path
18 * range from the inode's io tree, unlock the subvolume tree search path, flush
55 * releasing the search path.
125 * after we had to unlock the file range, release the search path, emit
131 * btrfs_next_leaf() releases the path, there's an ordered extent that
137 * will leave us with a path pointing to the new extent item, for the
146 * it, but after btrfs_next_leaf() released the path, delalloc was
245 * unlocking the range and releasing the path, if there's a hole
306 static int fiemap_next_leaf_item(struct btrfs_inode *inode, struct btrfs_path *path)
308 struct extent_buffer *clone = path->nodes[0];
313 path->slots[0]++;
314 if (path->slots[0] < btrfs_header_nritems(path->nodes[0]))
325 ret = btrfs_next_leaf(inode->root, path);
333 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
349 clone->start = path->nodes[0]->start;
351 copy_extent_buffer_full(clone, path->nodes[0]);
353 slot = path->slots[0];
354 btrfs_release_path(path);
355 path->nodes[0] = clone;
356 path->slots[0] = slot;
369 static int fiemap_search_slot(struct btrfs_inode *inode, struct btrfs_path *path,
383 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
387 if (ret > 0 && path->slots[0] > 0) {
388 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0] - 1);
390 path->slots[0]--;
393 if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) {
394 ret = btrfs_next_leaf(root, path);
398 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
419 clone = btrfs_clone_extent_buffer(path->nodes[0]);
423 slot = path->slots[0];
424 btrfs_release_path(path);
425 path->nodes[0] = clone;
426 path->slots[0] = slot;
555 struct btrfs_path *path,
570 ret = btrfs_lookup_file_extent(NULL, root, path, ino, (u64)-1, 0);
582 ASSERT(path->slots[0] > 0);
583 path->slots[0]--;
584 leaf = path->nodes[0];
585 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
597 ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_file_extent_item);
599 *last_extent_end_ret = btrfs_file_extent_end(path);
612 ret = btrfs_previous_item(root, path, ino, BTRFS_EXTENT_DATA_KEY);
620 leaf = path->nodes[0];
621 ei = btrfs_item_ptr(leaf, path->slots[0],
626 *last_extent_end_ret = btrfs_file_extent_end(path);
637 BTRFS_PATH_AUTO_FREE(path);
653 path = btrfs_alloc_path();
654 if (!cache.entries || !backref_ctx || !path) {
666 ret = fiemap_find_last_extent_offset(inode, path, &last_extent_end);
669 btrfs_release_path(path);
671 path->reada = READA_FORWARD;
672 ret = fiemap_search_slot(inode, path, range_start);
685 struct extent_buffer *leaf = path->nodes[0];
697 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
701 extent_end = btrfs_file_extent_end(path);
736 ei = btrfs_item_ptr(leaf, path->slots[0],
802 ret = fiemap_next_leaf_item(inode, path);
847 btrfs_release_path(path);
859 * Must free the path before emitting to the fiemap buffer because we
865 btrfs_free_path(path);
866 path = NULL;