Lines Matching refs:leaf

18 struct btrfs_inode_ref *btrfs_find_name_in_backref(struct extent_buffer *leaf,  in btrfs_find_name_in_backref()  argument
29 item_size = btrfs_item_size(leaf, slot); in btrfs_find_name_in_backref()
30 ptr = btrfs_item_ptr_offset(leaf, slot); in btrfs_find_name_in_backref()
33 len = btrfs_inode_ref_name_len(leaf, ref); in btrfs_find_name_in_backref()
38 if (memcmp_extent_buffer(leaf, name->name, name_ptr, in btrfs_find_name_in_backref()
46 struct extent_buffer *leaf, int slot, u64 ref_objectid, in btrfs_find_name_in_ext_backref() argument
56 item_size = btrfs_item_size(leaf, slot); in btrfs_find_name_in_ext_backref()
57 ptr = btrfs_item_ptr_offset(leaf, slot); in btrfs_find_name_in_ext_backref()
68 ref_name_len = btrfs_inode_extref_name_len(leaf, extref); in btrfs_find_name_in_ext_backref()
71 btrfs_inode_extref_parent(leaf, extref) == ref_objectid && in btrfs_find_name_in_ext_backref()
72 (memcmp_extent_buffer(leaf, name->name, name_ptr, in btrfs_find_name_in_ext_backref()
116 struct extent_buffer *leaf; in btrfs_del_inode_extref() local
150 leaf = path->nodes[0]; in btrfs_del_inode_extref()
151 item_size = btrfs_item_size(leaf, path->slots[0]); in btrfs_del_inode_extref()
153 *index = btrfs_inode_extref_index(leaf, extref); in btrfs_del_inode_extref()
165 item_start = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_del_inode_extref()
167 memmove_extent_buffer(leaf, ptr, ptr + del_len, in btrfs_del_inode_extref()
185 struct extent_buffer *leaf; in btrfs_del_inode_ref() local
217 leaf = path->nodes[0]; in btrfs_del_inode_ref()
218 item_size = btrfs_item_size(leaf, path->slots[0]); in btrfs_del_inode_ref()
221 *index = btrfs_inode_ref_index(leaf, ref); in btrfs_del_inode_ref()
229 item_start = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_del_inode_ref()
230 memmove_extent_buffer(leaf, ptr, ptr + sub_item_len, in btrfs_del_inode_ref()
266 struct extent_buffer *leaf; in btrfs_insert_inode_extref() local
291 leaf = path->nodes[0]; in btrfs_insert_inode_extref()
292 ptr = (unsigned long)btrfs_item_ptr(leaf, path->slots[0], char); in btrfs_insert_inode_extref()
293 ptr += btrfs_item_size(leaf, path->slots[0]) - ins_len; in btrfs_insert_inode_extref()
409 struct extent_buffer *leaf; in btrfs_lookup_inode() local
416 leaf = path->nodes[0]; in btrfs_lookup_inode()
417 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_lookup_inode()
428 struct extent_buffer *leaf, in btrfs_trace_truncate() argument
435 trace_btrfs_truncate_show_fi_inline(inode, leaf, fi, slot, in btrfs_trace_truncate()
438 trace_btrfs_truncate_show_fi_regular(inode, leaf, fi, offset); in btrfs_trace_truncate()
465 struct extent_buffer *leaf; in btrfs_truncate_inode_items() local
533 leaf = path->nodes[0]; in btrfs_truncate_inode_items()
534 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_truncate_inode_items()
545 fi = btrfs_item_ptr(leaf, path->slots[0], in btrfs_truncate_inode_items()
547 extent_type = btrfs_file_extent_type(leaf, fi); in btrfs_truncate_inode_items()
550 btrfs_file_extent_num_bytes(leaf, fi); in btrfs_truncate_inode_items()
552 item_end += btrfs_file_extent_ram_bytes(leaf, fi); in btrfs_truncate_inode_items()
554 btrfs_trace_truncate(control->inode, leaf, fi, in btrfs_truncate_inode_items()
580 extent_start = btrfs_file_extent_disk_bytenr(leaf, fi); in btrfs_truncate_inode_items()
583 btrfs_file_extent_num_bytes(leaf, fi); in btrfs_truncate_inode_items()
589 btrfs_set_file_extent_num_bytes(leaf, fi, in btrfs_truncate_inode_items()
594 btrfs_mark_buffer_dirty(leaf); in btrfs_truncate_inode_items()
597 btrfs_file_extent_disk_num_bytes(leaf, fi); in btrfs_truncate_inode_items()
599 btrfs_file_extent_offset(leaf, fi); in btrfs_truncate_inode_items()
602 num_dec = btrfs_file_extent_num_bytes(leaf, fi); in btrfs_truncate_inode_items()
613 btrfs_file_extent_encryption(leaf, fi) == 0 && in btrfs_truncate_inode_items()
614 btrfs_file_extent_other_encoding(leaf, fi) == 0 && in btrfs_truncate_inode_items()
615 btrfs_file_extent_compression(leaf, fi) == 0) { in btrfs_truncate_inode_items()
618 btrfs_set_file_extent_ram_bytes(leaf, fi, size); in btrfs_truncate_inode_items()
681 btrfs_init_data_ref(&ref, btrfs_header_owner(leaf), in btrfs_truncate_inode_items()