Lines Matching refs:leaf
219 struct extent_buffer *leaf; in btrfs_find_orphan_roots() local
243 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
244 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
250 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
253 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
350 struct extent_buffer *leaf; in btrfs_del_root_ref() local
367 leaf = path->nodes[0]; in btrfs_del_root_ref()
368 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
371 if ((btrfs_root_ref_dirid(leaf, ref) != dirid) || in btrfs_del_root_ref()
372 (btrfs_root_ref_name_len(leaf, ref) != name->len) || in btrfs_del_root_ref()
373 memcmp_extent_buffer(leaf, name->name, ptr, name->len)) { in btrfs_del_root_ref()
377 *sequence = btrfs_root_ref_sequence(leaf, ref); in btrfs_del_root_ref()
424 struct extent_buffer *leaf; in btrfs_add_root_ref() local
443 leaf = path->nodes[0]; in btrfs_add_root_ref()
444 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
445 btrfs_set_root_ref_dirid(leaf, ref, dirid); in btrfs_add_root_ref()
446 btrfs_set_root_ref_sequence(leaf, ref, sequence); in btrfs_add_root_ref()
447 btrfs_set_root_ref_name_len(leaf, ref, name->len); in btrfs_add_root_ref()
449 write_extent_buffer(leaf, name->name, ptr, name->len); in btrfs_add_root_ref()
450 btrfs_mark_buffer_dirty(trans, leaf); in btrfs_add_root_ref()