Lines Matching refs:leaf
33 struct extent_buffer *leaf; in insert_with_overflow() local
45 leaf = path->nodes[0]; in insert_with_overflow()
46 ptr = btrfs_item_ptr(leaf, path->slots[0], char); in insert_with_overflow()
47 ASSERT(data_size <= btrfs_item_size(leaf, path->slots[0])); in insert_with_overflow()
48 ptr += btrfs_item_size(leaf, path->slots[0]) - data_size; in insert_with_overflow()
67 struct extent_buffer *leaf; in btrfs_insert_xattr_item() local
84 leaf = path->nodes[0]; in btrfs_insert_xattr_item()
86 btrfs_set_dir_item_key(leaf, dir_item, &disk_key); in btrfs_insert_xattr_item()
87 btrfs_set_dir_flags(leaf, dir_item, BTRFS_FT_XATTR); in btrfs_insert_xattr_item()
88 btrfs_set_dir_name_len(leaf, dir_item, name_len); in btrfs_insert_xattr_item()
89 btrfs_set_dir_transid(leaf, dir_item, trans->transid); in btrfs_insert_xattr_item()
90 btrfs_set_dir_data_len(leaf, dir_item, data_len); in btrfs_insert_xattr_item()
94 write_extent_buffer(leaf, name, name_ptr, name_len); in btrfs_insert_xattr_item()
95 write_extent_buffer(leaf, data, data_ptr, data_len); in btrfs_insert_xattr_item()
118 struct extent_buffer *leaf; in btrfs_insert_dir_item() local
147 leaf = path->nodes[0]; in btrfs_insert_dir_item()
148 btrfs_set_dir_item_key(leaf, dir_item, &disk_key); in btrfs_insert_dir_item()
149 btrfs_set_dir_flags(leaf, dir_item, type); in btrfs_insert_dir_item()
150 btrfs_set_dir_data_len(leaf, dir_item, 0); in btrfs_insert_dir_item()
151 btrfs_set_dir_name_len(leaf, dir_item, name->len); in btrfs_insert_dir_item()
152 btrfs_set_dir_transid(leaf, dir_item, trans->transid); in btrfs_insert_dir_item()
155 write_extent_buffer(leaf, name->name, name_ptr, name->len); in btrfs_insert_dir_item()
156 btrfs_mark_buffer_dirty(trans, leaf); in btrfs_insert_dir_item()
240 struct extent_buffer *leaf; in btrfs_check_dir_item_collision() local
275 leaf = path->nodes[0]; in btrfs_check_dir_item_collision()
277 if (data_size + btrfs_item_size(leaf, slot) + in btrfs_check_dir_item_collision()
390 struct extent_buffer *leaf; in btrfs_match_dir_item_name() local
392 leaf = path->nodes[0]; in btrfs_match_dir_item_name()
393 dir_item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_dir_item); in btrfs_match_dir_item_name()
395 total_len = btrfs_item_size(leaf, path->slots[0]); in btrfs_match_dir_item_name()
398 btrfs_dir_name_len(leaf, dir_item) + in btrfs_match_dir_item_name()
399 btrfs_dir_data_len(leaf, dir_item); in btrfs_match_dir_item_name()
402 if (btrfs_dir_name_len(leaf, dir_item) == name_len && in btrfs_match_dir_item_name()
403 memcmp_extent_buffer(leaf, name, name_ptr, name_len) == 0) in btrfs_match_dir_item_name()
423 struct extent_buffer *leaf; in btrfs_delete_one_dir_name() local
428 leaf = path->nodes[0]; in btrfs_delete_one_dir_name()
429 sub_item_len = sizeof(*di) + btrfs_dir_name_len(leaf, di) + in btrfs_delete_one_dir_name()
430 btrfs_dir_data_len(leaf, di); in btrfs_delete_one_dir_name()
431 item_len = btrfs_item_size(leaf, path->slots[0]); in btrfs_delete_one_dir_name()
439 start = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_delete_one_dir_name()
440 memmove_extent_buffer(leaf, ptr, ptr + sub_item_len, in btrfs_delete_one_dir_name()