Lines Matching refs:ref

54 	struct ref_entry ref;  member
165 struct ref_entry *ref) in insert_ref_entry() argument
175 cmp = comp_refs(entry, ref); in insert_ref_entry()
184 rb_link_node(&ref->node, parent_node, p); in insert_ref_entry()
185 rb_insert_color(&ref->node, root); in insert_ref_entry()
238 struct ref_entry *ref; in free_block_entry() local
249 ref = rb_entry(n, struct ref_entry, node); in free_block_entry()
250 rb_erase(&ref->node, &be->refs); in free_block_entry()
251 kfree(ref); in free_block_entry()
317 struct ref_entry *ref = NULL, *exist; in add_tree_block() local
319 ref = kmalloc(sizeof(struct ref_entry), GFP_NOFS); in add_tree_block()
320 if (!ref) in add_tree_block()
324 ref->root_objectid = 0; in add_tree_block()
326 ref->root_objectid = ref_root; in add_tree_block()
327 ref->parent = parent; in add_tree_block()
328 ref->owner = level; in add_tree_block()
329 ref->offset = 0; in add_tree_block()
330 ref->num_refs = 1; in add_tree_block()
334 kfree(ref); in add_tree_block()
347 exist = insert_ref_entry(&be->refs, ref); in add_tree_block()
350 kfree(ref); in add_tree_block()
362 struct ref_entry *ref; in add_shared_data_ref() local
364 ref = kzalloc(sizeof(struct ref_entry), GFP_NOFS); in add_shared_data_ref()
365 if (!ref) in add_shared_data_ref()
369 kfree(ref); in add_shared_data_ref()
374 ref->parent = parent; in add_shared_data_ref()
375 ref->num_refs = num_refs; in add_shared_data_ref()
376 if (insert_ref_entry(&be->refs, ref)) { in add_shared_data_ref()
379 kfree(ref); in add_shared_data_ref()
392 struct ref_entry *ref; in add_extent_data_ref() local
399 ref = kzalloc(sizeof(struct ref_entry), GFP_NOFS); in add_extent_data_ref()
400 if (!ref) in add_extent_data_ref()
404 kfree(ref); in add_extent_data_ref()
409 ref->parent = 0; in add_extent_data_ref()
410 ref->owner = owner; in add_extent_data_ref()
411 ref->root_objectid = ref_root; in add_extent_data_ref()
412 ref->offset = offset; in add_extent_data_ref()
413 ref->num_refs = num_refs; in add_extent_data_ref()
414 if (insert_ref_entry(&be->refs, ref)) { in add_extent_data_ref()
417 kfree(ref); in add_extent_data_ref()
614 ra->action, ra->root, ra->ref.root_objectid, ra->ref.parent, in dump_ref_action()
615 ra->ref.owner, ra->ref.offset, ra->ref.num_refs); in dump_ref_action()
626 struct ref_entry *ref; in dump_block_entry() local
637 ref = rb_entry(n, struct ref_entry, node); in dump_block_entry()
640 ref->root_objectid, ref->parent, ref->owner, in dump_block_entry()
641 ref->offset, ref->num_refs); in dump_block_entry()
665 struct ref_entry *ref = NULL, *exist; in btrfs_ref_tree_mod() local
693 ref = kzalloc(sizeof(struct ref_entry), GFP_NOFS); in btrfs_ref_tree_mod()
695 if (!ra || !ref) { in btrfs_ref_tree_mod()
696 kfree(ref); in btrfs_ref_tree_mod()
702 ref->parent = parent; in btrfs_ref_tree_mod()
703 ref->owner = owner; in btrfs_ref_tree_mod()
704 ref->root_objectid = ref_root; in btrfs_ref_tree_mod()
705 ref->offset = offset; in btrfs_ref_tree_mod()
706 ref->num_refs = (action == BTRFS_DROP_DELAYED_REF) ? -1 : 1; in btrfs_ref_tree_mod()
708 memcpy(&ra->ref, ref, sizeof(struct ref_entry)); in btrfs_ref_tree_mod()
715 ra->ref.owner = owner; in btrfs_ref_tree_mod()
716 ra->ref.offset = offset; in btrfs_ref_tree_mod()
717 ra->ref.root_objectid = ref_root; in btrfs_ref_tree_mod()
737 kfree(ref); in btrfs_ref_tree_mod()
751 kfree(ref); in btrfs_ref_tree_mod()
770 kfree(ref); in btrfs_ref_tree_mod()
792 kfree(ref); in btrfs_ref_tree_mod()
802 kfree(ref); in btrfs_ref_tree_mod()
817 exist = insert_ref_entry(&be->refs, ref); in btrfs_ref_tree_mod()
825 kfree(ref); in btrfs_ref_tree_mod()
841 kfree(ref); in btrfs_ref_tree_mod()
845 kfree(ref); in btrfs_ref_tree_mod()
852 kfree(ref); in btrfs_ref_tree_mod()