Lines Matching refs:leaf
212 struct extent_buffer *leaf; in btrfs_find_orphan_roots() local
238 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
239 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
245 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
248 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
359 struct extent_buffer *leaf; in btrfs_del_root_ref() local
376 leaf = path->nodes[0]; in btrfs_del_root_ref()
377 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
380 WARN_ON(btrfs_root_ref_dirid(leaf, ref) != dirid); in btrfs_del_root_ref()
381 WARN_ON(btrfs_root_ref_name_len(leaf, ref) != name_len); in btrfs_del_root_ref()
383 WARN_ON(memcmp_extent_buffer(leaf, name, ptr, name_len)); in btrfs_del_root_ref()
384 *sequence = btrfs_root_ref_sequence(leaf, ref); in btrfs_del_root_ref()
431 struct extent_buffer *leaf; in btrfs_add_root_ref() local
450 leaf = path->nodes[0]; in btrfs_add_root_ref()
451 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
452 btrfs_set_root_ref_dirid(leaf, ref, dirid); in btrfs_add_root_ref()
453 btrfs_set_root_ref_sequence(leaf, ref, sequence); in btrfs_add_root_ref()
454 btrfs_set_root_ref_name_len(leaf, ref, name_len); in btrfs_add_root_ref()
456 write_extent_buffer(leaf, name, ptr, name_len); in btrfs_add_root_ref()
457 btrfs_mark_buffer_dirty(leaf); in btrfs_add_root_ref()