Lines Matching refs:path
430 struct btrfs_path *path, struct btrfs_key *key,
437 struct extent_buffer *leaf = path->nodes[0];
498 struct btrfs_path *path, u64 *bytenr, u64 *num_bytes)
501 struct extent_buffer *leaf = path->nodes[0];
517 ret = process_extent_item(fs_info, path, &key, i,
551 static int walk_down_tree(struct btrfs_root *root, struct btrfs_path *path,
563 block_bytenr = btrfs_node_blockptr(path->nodes[level],
564 path->slots[level]);
565 gen = btrfs_node_ptr_generation(path->nodes[level],
566 path->slots[level]);
567 btrfs_node_key_to_cpu(path->nodes[level], &first_key,
568 path->slots[level]);
579 path->nodes[level-1] = eb;
580 path->slots[level-1] = 0;
581 path->locks[level-1] = BTRFS_READ_LOCK_BLOCKING;
583 ret = process_leaf(root, path, bytenr, num_bytes);
593 static int walk_up_tree(struct btrfs_path *path, int *level)
598 if (!path->nodes[l])
601 path->slots[l]++;
602 if (path->slots[l] <
603 btrfs_header_nritems(path->nodes[l])) {
608 btrfs_tree_unlock_rw(path->nodes[l], path->locks[l]);
609 free_extent_buffer(path->nodes[l]);
610 path->nodes[l] = NULL;
611 path->slots[l] = 0;
612 path->locks[l] = 0;
995 struct btrfs_path *path;
1003 path = btrfs_alloc_path();
1004 if (!path)
1010 path->nodes[level] = eb;
1011 path->slots[level] = 0;
1012 path->locks[level] = BTRFS_READ_LOCK_BLOCKING;
1021 ret = walk_down_tree(fs_info->extent_root, path, level,
1025 ret = walk_up_tree(path, &level);
1037 btrfs_free_path(path);