Lines Matching refs:leaf
30 struct extent_buffer *leaf; in insert_with_overflow() local
42 leaf = path->nodes[0]; in insert_with_overflow()
43 ptr = btrfs_item_ptr(leaf, path->slots[0], char); in insert_with_overflow()
44 ASSERT(data_size <= btrfs_item_size(leaf, path->slots[0])); in insert_with_overflow()
45 ptr += btrfs_item_size(leaf, path->slots[0]) - data_size; in insert_with_overflow()
64 struct extent_buffer *leaf; in btrfs_insert_xattr_item() local
81 leaf = path->nodes[0]; in btrfs_insert_xattr_item()
83 btrfs_set_dir_item_key(leaf, dir_item, &disk_key); in btrfs_insert_xattr_item()
84 btrfs_set_dir_type(leaf, dir_item, BTRFS_FT_XATTR); in btrfs_insert_xattr_item()
85 btrfs_set_dir_name_len(leaf, dir_item, name_len); in btrfs_insert_xattr_item()
86 btrfs_set_dir_transid(leaf, dir_item, trans->transid); in btrfs_insert_xattr_item()
87 btrfs_set_dir_data_len(leaf, dir_item, data_len); in btrfs_insert_xattr_item()
91 write_extent_buffer(leaf, name, name_ptr, name_len); in btrfs_insert_xattr_item()
92 write_extent_buffer(leaf, data, data_ptr, data_len); in btrfs_insert_xattr_item()
115 struct extent_buffer *leaf; in btrfs_insert_dir_item() local
141 leaf = path->nodes[0]; in btrfs_insert_dir_item()
142 btrfs_set_dir_item_key(leaf, dir_item, &disk_key); in btrfs_insert_dir_item()
143 btrfs_set_dir_type(leaf, dir_item, type); in btrfs_insert_dir_item()
144 btrfs_set_dir_data_len(leaf, dir_item, 0); in btrfs_insert_dir_item()
145 btrfs_set_dir_name_len(leaf, dir_item, name->len); in btrfs_insert_dir_item()
146 btrfs_set_dir_transid(leaf, dir_item, trans->transid); in btrfs_insert_dir_item()
149 write_extent_buffer(leaf, name->name, name_ptr, name->len); in btrfs_insert_dir_item()
150 btrfs_mark_buffer_dirty(leaf); in btrfs_insert_dir_item()
234 struct extent_buffer *leaf; in btrfs_check_dir_item_collision() local
269 leaf = path->nodes[0]; in btrfs_check_dir_item_collision()
271 if (data_size + btrfs_item_size(leaf, slot) + in btrfs_check_dir_item_collision()
384 struct extent_buffer *leaf; in btrfs_match_dir_item_name() local
386 leaf = path->nodes[0]; in btrfs_match_dir_item_name()
387 dir_item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_dir_item); in btrfs_match_dir_item_name()
389 total_len = btrfs_item_size(leaf, path->slots[0]); in btrfs_match_dir_item_name()
392 btrfs_dir_name_len(leaf, dir_item) + in btrfs_match_dir_item_name()
393 btrfs_dir_data_len(leaf, dir_item); in btrfs_match_dir_item_name()
396 if (btrfs_dir_name_len(leaf, dir_item) == name_len && in btrfs_match_dir_item_name()
397 memcmp_extent_buffer(leaf, name, name_ptr, name_len) == 0) in btrfs_match_dir_item_name()
417 struct extent_buffer *leaf; in btrfs_delete_one_dir_name() local
422 leaf = path->nodes[0]; in btrfs_delete_one_dir_name()
423 sub_item_len = sizeof(*di) + btrfs_dir_name_len(leaf, di) + in btrfs_delete_one_dir_name()
424 btrfs_dir_data_len(leaf, di); in btrfs_delete_one_dir_name()
425 item_len = btrfs_item_size(leaf, path->slots[0]); in btrfs_delete_one_dir_name()
433 start = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_delete_one_dir_name()
434 memmove_extent_buffer(leaf, ptr, ptr + sub_item_len, in btrfs_delete_one_dir_name()