Lines Matching full:leaf

17 struct btrfs_inode_ref *btrfs_find_name_in_backref(const struct extent_buffer *leaf,  in btrfs_find_name_in_backref()  argument
28 item_size = btrfs_item_size(leaf, slot); in btrfs_find_name_in_backref()
29 ptr = btrfs_item_ptr_offset(leaf, slot); in btrfs_find_name_in_backref()
32 len = btrfs_inode_ref_name_len(leaf, ref); in btrfs_find_name_in_backref()
37 if (memcmp_extent_buffer(leaf, name->name, name_ptr, in btrfs_find_name_in_backref()
45 const struct extent_buffer *leaf, int slot, u64 ref_objectid, in btrfs_find_name_in_ext_backref() argument
55 item_size = btrfs_item_size(leaf, slot); in btrfs_find_name_in_ext_backref()
56 ptr = btrfs_item_ptr_offset(leaf, slot); in btrfs_find_name_in_ext_backref()
67 ref_name_len = btrfs_inode_extref_name_len(leaf, extref); in btrfs_find_name_in_ext_backref()
70 btrfs_inode_extref_parent(leaf, extref) == ref_objectid && in btrfs_find_name_in_ext_backref()
71 (memcmp_extent_buffer(leaf, name->name, name_ptr, in btrfs_find_name_in_ext_backref()
115 struct extent_buffer *leaf; in btrfs_del_inode_extref() local
149 leaf = path->nodes[0]; in btrfs_del_inode_extref()
150 item_size = btrfs_item_size(leaf, path->slots[0]); in btrfs_del_inode_extref()
152 *index = btrfs_inode_extref_index(leaf, extref); in btrfs_del_inode_extref()
164 item_start = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_del_inode_extref()
166 memmove_extent_buffer(leaf, ptr, ptr + del_len, in btrfs_del_inode_extref()
184 struct extent_buffer *leaf; in btrfs_del_inode_ref() local
216 leaf = path->nodes[0]; in btrfs_del_inode_ref()
217 item_size = btrfs_item_size(leaf, path->slots[0]); in btrfs_del_inode_ref()
220 *index = btrfs_inode_ref_index(leaf, ref); in btrfs_del_inode_ref()
228 item_start = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_del_inode_ref()
229 memmove_extent_buffer(leaf, ptr, ptr + sub_item_len, in btrfs_del_inode_ref()
265 struct extent_buffer *leaf; in btrfs_insert_inode_extref() local
290 leaf = path->nodes[0]; in btrfs_insert_inode_extref()
291 ptr = (unsigned long)btrfs_item_ptr(leaf, path->slots[0], char); in btrfs_insert_inode_extref()
292 ptr += btrfs_item_size(leaf, path->slots[0]) - ins_len; in btrfs_insert_inode_extref()
408 struct extent_buffer *leaf; in btrfs_lookup_inode() local
415 leaf = path->nodes[0]; in btrfs_lookup_inode()
416 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_lookup_inode()
427 const struct extent_buffer *leaf, in btrfs_trace_truncate() argument
434 trace_btrfs_truncate_show_fi_inline(inode, leaf, fi, slot, in btrfs_trace_truncate()
437 trace_btrfs_truncate_show_fi_regular(inode, leaf, fi, offset); in btrfs_trace_truncate()
464 struct extent_buffer *leaf; in btrfs_truncate_inode_items() local
505 * With a 16K leaf size and 128MiB extents, you can actually queue up a in btrfs_truncate_inode_items()
506 * huge file in a single leaf. Most of the time that bytes_deleted is in btrfs_truncate_inode_items()
532 leaf = path->nodes[0]; in btrfs_truncate_inode_items()
533 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_truncate_inode_items()
544 fi = btrfs_item_ptr(leaf, path->slots[0], in btrfs_truncate_inode_items()
546 extent_type = btrfs_file_extent_type(leaf, fi); in btrfs_truncate_inode_items()
549 btrfs_file_extent_num_bytes(leaf, fi); in btrfs_truncate_inode_items()
551 item_end += btrfs_file_extent_ram_bytes(leaf, fi); in btrfs_truncate_inode_items()
553 btrfs_trace_truncate(control->inode, leaf, fi, in btrfs_truncate_inode_items()
579 extent_start = btrfs_file_extent_disk_bytenr(leaf, fi); in btrfs_truncate_inode_items()
582 btrfs_file_extent_num_bytes(leaf, fi); in btrfs_truncate_inode_items()
588 btrfs_set_file_extent_num_bytes(leaf, fi, in btrfs_truncate_inode_items()
593 btrfs_mark_buffer_dirty(trans, leaf); in btrfs_truncate_inode_items()
596 btrfs_file_extent_disk_num_bytes(leaf, fi); in btrfs_truncate_inode_items()
598 btrfs_file_extent_offset(leaf, fi); in btrfs_truncate_inode_items()
601 num_dec = btrfs_file_extent_num_bytes(leaf, fi); in btrfs_truncate_inode_items()
612 btrfs_file_extent_encryption(leaf, fi) == 0 && in btrfs_truncate_inode_items()
613 btrfs_file_extent_other_encoding(leaf, fi) == 0 && in btrfs_truncate_inode_items()
614 btrfs_file_extent_compression(leaf, fi) == 0) { in btrfs_truncate_inode_items()
617 btrfs_set_file_extent_ram_bytes(leaf, fi, size); in btrfs_truncate_inode_items()
678 .ref_root = btrfs_header_owner(leaf), in btrfs_truncate_inode_items()