Lines Matching refs:leaf
225 struct extent_buffer *leaf; in btrfs_find_orphan_roots() local
255 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
256 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
262 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
265 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
365 struct extent_buffer *leaf; in btrfs_del_root_ref() local
382 leaf = path->nodes[0]; in btrfs_del_root_ref()
383 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
386 WARN_ON(btrfs_root_ref_dirid(leaf, ref) != dirid); in btrfs_del_root_ref()
387 WARN_ON(btrfs_root_ref_name_len(leaf, ref) != name_len); in btrfs_del_root_ref()
389 WARN_ON(memcmp_extent_buffer(leaf, name, ptr, name_len)); in btrfs_del_root_ref()
390 *sequence = btrfs_root_ref_sequence(leaf, ref); in btrfs_del_root_ref()
437 struct extent_buffer *leaf; in btrfs_add_root_ref() local
456 leaf = path->nodes[0]; in btrfs_add_root_ref()
457 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
458 btrfs_set_root_ref_dirid(leaf, ref, dirid); in btrfs_add_root_ref()
459 btrfs_set_root_ref_sequence(leaf, ref, sequence); in btrfs_add_root_ref()
460 btrfs_set_root_ref_name_len(leaf, ref, name_len); in btrfs_add_root_ref()
462 write_extent_buffer(leaf, name, ptr, name_len); in btrfs_add_root_ref()
463 btrfs_mark_buffer_dirty(leaf); in btrfs_add_root_ref()