Lines Matching refs:path
224 struct btrfs_path *path;
411 * this makes the path point to (inum INODE_ITEM ioff)
417 ret = btrfs_search_slot(NULL, local_root, &key, swarn->path, 0, 0);
420 btrfs_release_path(swarn->path);
424 eb = swarn->path->nodes[0];
425 inode_item = btrfs_item_ptr(eb, swarn->path->slots[0],
428 btrfs_release_path(swarn->path);
436 ipath = init_ipath(4096, local_root, swarn->path);
455 "%s at logical %llu on dev %s, physical %llu, root %llu, inode %llu, offset %llu, length %u, links %u (path: %s)",
469 "%s at logical %llu on dev %s, physical %llu, root %llu, inode %llu, offset %llu: path resolving failed with ret=%d",
483 struct btrfs_path *path;
498 path = btrfs_alloc_path();
499 if (!path)
507 ret = extent_from_logical(fs_info, swarn.logical, path, &found_key,
514 eb = path->nodes[0];
515 ei = btrfs_item_ptr(eb, path->slots[0], struct btrfs_extent_item);
516 item_size = btrfs_item_size(eb, path->slots[0]);
541 btrfs_release_path(path);
545 btrfs_release_path(path);
551 swarn.path = path;
558 btrfs_free_path(path);
1188 * Just like the scrub read path
1191 * Unlike the regular writeback path, which would write back to all stripes
1334 static int compare_extent_item_range(struct btrfs_path *path,
1337 struct btrfs_fs_info *fs_info = path->nodes[0]->fs_info;
1341 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
1360 * If the path is not initialized, we will initialize the search by doing
1362 * If the path is already initialized, we will use the path as the initial
1368 * Return 0 if we found such extent item, and @path will point to the extent item.
1369 * Return >0 if no such extent item can be found, and @path will be released.
1370 * Return <0 if hit fatal error, and @path will be released.
1373 struct btrfs_path *path,
1380 /* Continue using the existing path */
1381 if (path->nodes[0])
1391 ret = btrfs_search_slot(NULL, extent_root, &key, path, 0, 0);
1400 ret = btrfs_previous_extent_item(extent_root, path, 0);
1409 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
1416 ret = compare_extent_item_range(path, search_start, search_len);
1422 path->slots[0]++;
1423 if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) {
1424 ret = btrfs_next_leaf(extent_root, path);
1427 btrfs_release_path(path);
1432 btrfs_release_path(path);
1436 static void get_extent_info(struct btrfs_path *path, u64 *extent_start_ret,
1442 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
1447 *size_ret = path->nodes[0]->fs_info->nodesize;
1450 ei = btrfs_item_ptr(path->nodes[0], path->slots[0], struct btrfs_extent_item);
1451 *flags_ret = btrfs_extent_flags(path->nodes[0], ei);
1452 *generation_ret = btrfs_extent_generation(path->nodes[0], ei);
2387 struct btrfs_path *path;
2400 path = btrfs_alloc_path();
2401 if (!path)
2404 path->reada = READA_FORWARD;
2405 path->search_commit_root = 1;
2406 path->skip_locking = 1;
2415 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
2419 if (path->slots[0] >=
2420 btrfs_header_nritems(path->nodes[0])) {
2421 ret = btrfs_next_leaf(root, path);
2433 l = path->nodes[0];
2434 slot = path->slots[0];
2485 * setup through the regular write path (by btrfs_map_block()),
2671 btrfs_release_path(path);
2674 btrfs_free_path(path);