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