Lines Matching refs:path
35 struct btrfs_path *path, in insert_with_overflow() argument
46 ret = btrfs_insert_empty_item(trans, root, path, cpu_key, data_size); in insert_with_overflow()
49 di = btrfs_match_dir_item_name(root, path, name, name_len); in insert_with_overflow()
52 btrfs_extend_item(root, path, data_size); in insert_with_overflow()
56 leaf = path->nodes[0]; in insert_with_overflow()
57 item = btrfs_item_nr(path->slots[0]); in insert_with_overflow()
58 ptr = btrfs_item_ptr(leaf, path->slots[0], char); in insert_with_overflow()
70 struct btrfs_path *path, u64 objectid, in btrfs_insert_xattr_item() argument
89 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_xattr_item()
95 leaf = path->nodes[0]; in btrfs_insert_xattr_item()
107 btrfs_mark_buffer_dirty(path->nodes[0]); in btrfs_insert_xattr_item()
127 struct btrfs_path *path; in btrfs_insert_dir_item() local
139 path = btrfs_alloc_path(); in btrfs_insert_dir_item()
140 if (!path) in btrfs_insert_dir_item()
142 path->leave_spinning = 1; in btrfs_insert_dir_item()
147 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_dir_item()
156 leaf = path->nodes[0]; in btrfs_insert_dir_item()
173 btrfs_release_path(path); in btrfs_insert_dir_item()
178 btrfs_free_path(path); in btrfs_insert_dir_item()
193 struct btrfs_path *path, u64 dir, in btrfs_lookup_dir_item() argument
207 ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); in btrfs_lookup_dir_item()
213 return btrfs_match_dir_item_name(root, path, name, name_len); in btrfs_lookup_dir_item()
225 struct btrfs_path *path; in btrfs_check_dir_item_collision() local
228 path = btrfs_alloc_path(); in btrfs_check_dir_item_collision()
229 if (!path) in btrfs_check_dir_item_collision()
236 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); in btrfs_check_dir_item_collision()
249 di = btrfs_match_dir_item_name(root, path, name, name_len); in btrfs_check_dir_item_collision()
261 leaf = path->nodes[0]; in btrfs_check_dir_item_collision()
262 slot = path->slots[0]; in btrfs_check_dir_item_collision()
271 btrfs_free_path(path); in btrfs_check_dir_item_collision()
286 struct btrfs_path *path, u64 dir, in btrfs_lookup_dir_index_item() argument
299 ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); in btrfs_lookup_dir_index_item()
304 return btrfs_match_dir_item_name(root, path, name, name_len); in btrfs_lookup_dir_index_item()
309 struct btrfs_path *path, u64 dirid, in btrfs_search_dir_index_item() argument
322 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); in btrfs_search_dir_index_item()
326 leaf = path->nodes[0]; in btrfs_search_dir_index_item()
330 if (path->slots[0] >= nritems) { in btrfs_search_dir_index_item()
331 ret = btrfs_next_leaf(root, path); in btrfs_search_dir_index_item()
336 leaf = path->nodes[0]; in btrfs_search_dir_index_item()
341 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_search_dir_index_item()
345 di = btrfs_match_dir_item_name(root, path, name, name_len); in btrfs_search_dir_index_item()
349 path->slots[0]++; in btrfs_search_dir_index_item()
356 struct btrfs_path *path, u64 dir, in btrfs_lookup_xattr() argument
368 ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); in btrfs_lookup_xattr()
374 return btrfs_match_dir_item_name(root, path, name, name_len); in btrfs_lookup_xattr()
383 struct btrfs_path *path, in btrfs_match_dir_item_name() argument
393 leaf = path->nodes[0]; in btrfs_match_dir_item_name()
394 dir_item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_dir_item); in btrfs_match_dir_item_name()
398 total_len = btrfs_item_size_nr(leaf, path->slots[0]); in btrfs_match_dir_item_name()
422 struct btrfs_path *path, in btrfs_delete_one_dir_name() argument
431 leaf = path->nodes[0]; in btrfs_delete_one_dir_name()
434 item_len = btrfs_item_size_nr(leaf, path->slots[0]); in btrfs_delete_one_dir_name()
436 ret = btrfs_del_item(trans, root, path); in btrfs_delete_one_dir_name()
442 start = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_delete_one_dir_name()
445 btrfs_truncate_item(root, path, item_len - sub_item_len, 1); in btrfs_delete_one_dir_name()