Lines Matching refs:path
433 struct btrfs_path *path, struct btrfs_key *key,
440 struct extent_buffer *leaf = path->nodes[0];
501 struct btrfs_path *path, u64 *bytenr, u64 *num_bytes,
505 struct extent_buffer *leaf = path->nodes[0];
521 ret = process_extent_item(fs_info, path, &key, i,
555 static int walk_down_tree(struct btrfs_root *root, struct btrfs_path *path,
564 eb = btrfs_read_node_slot(path->nodes[level],
565 path->slots[level]);
569 path->nodes[level-1] = eb;
570 path->slots[level-1] = 0;
571 path->locks[level-1] = BTRFS_READ_LOCK;
573 ret = process_leaf(root, path, bytenr, num_bytes,
584 static int walk_up_tree(struct btrfs_path *path, int *level)
589 if (!path->nodes[l])
592 path->slots[l]++;
593 if (path->slots[l] <
594 btrfs_header_nritems(path->nodes[l])) {
599 btrfs_tree_unlock_rw(path->nodes[l], path->locks[l]);
600 free_extent_buffer(path->nodes[l]);
601 path->nodes[l] = NULL;
602 path->slots[l] = 0;
603 path->locks[l] = 0;
983 struct btrfs_path *path;
992 path = btrfs_alloc_path();
993 if (!path)
999 path->nodes[level] = eb;
1000 path->slots[level] = 0;
1001 path->locks[level] = BTRFS_READ_LOCK;
1010 ret = walk_down_tree(extent_root, path, level,
1014 ret = walk_up_tree(path, &level);
1026 btrfs_free_path(path);