Lines Matching refs:path
21 struct btrfs_path *path,
33 ret = btrfs_insert_empty_item(trans, root, path, cpu_key, data_size);
36 di = btrfs_match_dir_item_name(fs_info, path, name, name_len);
39 btrfs_extend_item(path, data_size);
43 leaf = path->nodes[0];
44 item = btrfs_item_nr(path->slots[0]);
45 ptr = btrfs_item_ptr(leaf, path->slots[0], char);
57 struct btrfs_path *path, u64 objectid,
77 dir_item = insert_with_overflow(trans, root, path, &key, data_size,
83 leaf = path->nodes[0];
95 btrfs_mark_buffer_dirty(path->nodes[0]);
115 struct btrfs_path *path;
127 path = btrfs_alloc_path();
128 if (!path)
130 path->leave_spinning = 1;
135 dir_item = insert_with_overflow(trans, root, path, &key, data_size,
144 leaf = path->nodes[0];
161 btrfs_release_path(path);
166 btrfs_free_path(path);
181 struct btrfs_path *path, u64 dir,
195 ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow);
201 return btrfs_match_dir_item_name(root->fs_info, path, name, name_len);
213 struct btrfs_path *path;
216 path = btrfs_alloc_path();
217 if (!path)
224 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
237 di = btrfs_match_dir_item_name(root->fs_info, path, name, name_len);
249 leaf = path->nodes[0];
250 slot = path->slots[0];
259 btrfs_free_path(path);
274 struct btrfs_path *path, u64 dir,
287 ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow);
292 return btrfs_match_dir_item_name(root->fs_info, path, name, name_len);
297 struct btrfs_path *path, u64 dirid,
310 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
314 leaf = path->nodes[0];
318 if (path->slots[0] >= nritems) {
319 ret = btrfs_next_leaf(root, path);
324 leaf = path->nodes[0];
329 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
333 di = btrfs_match_dir_item_name(root->fs_info, path,
338 path->slots[0]++;
345 struct btrfs_path *path, u64 dir,
357 ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow);
363 return btrfs_match_dir_item_name(root->fs_info, path, name, name_len);
367 * helper function to look at the directory item pointed to by 'path'
372 struct btrfs_path *path,
382 leaf = path->nodes[0];
383 dir_item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_dir_item);
385 total_len = btrfs_item_size_nr(leaf, path->slots[0]);
409 struct btrfs_path *path,
418 leaf = path->nodes[0];
421 item_len = btrfs_item_size_nr(leaf, path->slots[0]);
423 ret = btrfs_del_item(trans, root, path);
429 start = btrfs_item_ptr_offset(leaf, path->slots[0]);
432 btrfs_truncate_item(path, item_len - sub_item_len, 1);