Lines Matching refs:leaf
31 struct extent_buffer *leaf; in insert_with_overflow() local
43 leaf = path->nodes[0]; in insert_with_overflow()
45 ptr = btrfs_item_ptr(leaf, path->slots[0], char); in insert_with_overflow()
46 BUG_ON(data_size > btrfs_item_size(leaf, item)); in insert_with_overflow()
47 ptr += btrfs_item_size(leaf, item) - data_size; in insert_with_overflow()
66 struct extent_buffer *leaf; in btrfs_insert_xattr_item() local
83 leaf = path->nodes[0]; in btrfs_insert_xattr_item()
85 btrfs_set_dir_item_key(leaf, dir_item, &disk_key); in btrfs_insert_xattr_item()
86 btrfs_set_dir_type(leaf, dir_item, BTRFS_FT_XATTR); in btrfs_insert_xattr_item()
87 btrfs_set_dir_name_len(leaf, dir_item, name_len); in btrfs_insert_xattr_item()
88 btrfs_set_dir_transid(leaf, dir_item, trans->transid); in btrfs_insert_xattr_item()
89 btrfs_set_dir_data_len(leaf, dir_item, data_len); in btrfs_insert_xattr_item()
93 write_extent_buffer(leaf, name, name_ptr, name_len); in btrfs_insert_xattr_item()
94 write_extent_buffer(leaf, data, data_ptr, data_len); in btrfs_insert_xattr_item()
117 struct extent_buffer *leaf; in btrfs_insert_dir_item() local
143 leaf = path->nodes[0]; in btrfs_insert_dir_item()
144 btrfs_set_dir_item_key(leaf, dir_item, &disk_key); in btrfs_insert_dir_item()
145 btrfs_set_dir_type(leaf, dir_item, type); in btrfs_insert_dir_item()
146 btrfs_set_dir_data_len(leaf, dir_item, 0); in btrfs_insert_dir_item()
147 btrfs_set_dir_name_len(leaf, dir_item, name_len); in btrfs_insert_dir_item()
148 btrfs_set_dir_transid(leaf, dir_item, trans->transid); in btrfs_insert_dir_item()
151 write_extent_buffer(leaf, name, name_ptr, name_len); in btrfs_insert_dir_item()
152 btrfs_mark_buffer_dirty(leaf); in btrfs_insert_dir_item()
235 struct extent_buffer *leaf; in btrfs_check_dir_item_collision() local
272 leaf = path->nodes[0]; in btrfs_check_dir_item_collision()
274 if (data_size + btrfs_item_size_nr(leaf, slot) + in btrfs_check_dir_item_collision()
330 struct extent_buffer *leaf; in btrfs_search_dir_index_item() local
344 leaf = path->nodes[0]; in btrfs_search_dir_index_item()
345 nritems = btrfs_header_nritems(leaf); in btrfs_search_dir_index_item()
354 leaf = path->nodes[0]; in btrfs_search_dir_index_item()
355 nritems = btrfs_header_nritems(leaf); in btrfs_search_dir_index_item()
359 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_search_dir_index_item()
407 struct extent_buffer *leaf; in btrfs_match_dir_item_name() local
409 leaf = path->nodes[0]; in btrfs_match_dir_item_name()
410 dir_item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_dir_item); in btrfs_match_dir_item_name()
412 total_len = btrfs_item_size_nr(leaf, path->slots[0]); in btrfs_match_dir_item_name()
415 btrfs_dir_name_len(leaf, dir_item) + in btrfs_match_dir_item_name()
416 btrfs_dir_data_len(leaf, dir_item); in btrfs_match_dir_item_name()
419 if (btrfs_dir_name_len(leaf, dir_item) == name_len && in btrfs_match_dir_item_name()
420 memcmp_extent_buffer(leaf, name, name_ptr, name_len) == 0) in btrfs_match_dir_item_name()
440 struct extent_buffer *leaf; in btrfs_delete_one_dir_name() local
445 leaf = path->nodes[0]; in btrfs_delete_one_dir_name()
446 sub_item_len = sizeof(*di) + btrfs_dir_name_len(leaf, di) + in btrfs_delete_one_dir_name()
447 btrfs_dir_data_len(leaf, di); in btrfs_delete_one_dir_name()
448 item_len = btrfs_item_size_nr(leaf, path->slots[0]); in btrfs_delete_one_dir_name()
456 start = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_delete_one_dir_name()
457 memmove_extent_buffer(leaf, ptr, ptr + sub_item_len, in btrfs_delete_one_dir_name()