Lines Matching refs:head_ref

575 	struct btrfs_delayed_ref_head *head_ref = NULL;  in add_delayed_ref_head()  local
618 head_ref = btrfs_delayed_node_to_head(ref); in add_delayed_ref_head()
619 head_ref->must_insert_reserved = must_insert_reserved; in add_delayed_ref_head()
620 head_ref->is_data = is_data; in add_delayed_ref_head()
621 head_ref->ref_root = RB_ROOT; in add_delayed_ref_head()
622 head_ref->processing = 0; in add_delayed_ref_head()
623 head_ref->total_ref_mod = count_mod; in add_delayed_ref_head()
625 spin_lock_init(&head_ref->lock); in add_delayed_ref_head()
626 mutex_init(&head_ref->mutex); in add_delayed_ref_head()
628 trace_add_delayed_ref_head(ref, head_ref, action); in add_delayed_ref_head()
631 &head_ref->href_node); in add_delayed_ref_head()
638 kmem_cache_free(btrfs_delayed_ref_head_cachep, head_ref); in add_delayed_ref_head()
639 head_ref = existing; in add_delayed_ref_head()
648 return head_ref; in add_delayed_ref_head()
657 struct btrfs_delayed_ref_head *head_ref, in add_delayed_tree_ref() argument
696 spin_lock(&head_ref->lock); in add_delayed_tree_ref()
697 existing = tree_insert(&head_ref->ref_root, &ref->rb_node); in add_delayed_tree_ref()
699 update_existing_ref(trans, delayed_refs, head_ref, existing, in add_delayed_tree_ref()
710 spin_unlock(&head_ref->lock); in add_delayed_tree_ref()
719 struct btrfs_delayed_ref_head *head_ref, in add_delayed_data_ref() argument
761 spin_lock(&head_ref->lock); in add_delayed_data_ref()
762 existing = tree_insert(&head_ref->ref_root, &ref->rb_node); in add_delayed_data_ref()
764 update_existing_ref(trans, delayed_refs, head_ref, existing, in add_delayed_data_ref()
775 spin_unlock(&head_ref->lock); in add_delayed_data_ref()
791 struct btrfs_delayed_ref_head *head_ref; in btrfs_add_delayed_tree_ref() local
802 head_ref = kmem_cache_alloc(btrfs_delayed_ref_head_cachep, GFP_NOFS); in btrfs_add_delayed_tree_ref()
803 if (!head_ref) { in btrfs_add_delayed_tree_ref()
808 head_ref->extent_op = extent_op; in btrfs_add_delayed_tree_ref()
817 head_ref = add_delayed_ref_head(fs_info, trans, &head_ref->node, in btrfs_add_delayed_tree_ref()
820 add_delayed_tree_ref(fs_info, trans, head_ref, &ref->node, bytenr, in btrfs_add_delayed_tree_ref()
840 struct btrfs_delayed_ref_head *head_ref; in btrfs_add_delayed_data_ref() local
851 head_ref = kmem_cache_alloc(btrfs_delayed_ref_head_cachep, GFP_NOFS); in btrfs_add_delayed_data_ref()
852 if (!head_ref) { in btrfs_add_delayed_data_ref()
857 head_ref->extent_op = extent_op; in btrfs_add_delayed_data_ref()
866 head_ref = add_delayed_ref_head(fs_info, trans, &head_ref->node, in btrfs_add_delayed_data_ref()
869 add_delayed_data_ref(fs_info, trans, head_ref, &ref->node, bytenr, in btrfs_add_delayed_data_ref()
882 struct btrfs_delayed_ref_head *head_ref; in btrfs_add_delayed_extent_op() local
885 head_ref = kmem_cache_alloc(btrfs_delayed_ref_head_cachep, GFP_NOFS); in btrfs_add_delayed_extent_op()
886 if (!head_ref) in btrfs_add_delayed_extent_op()
889 head_ref->extent_op = extent_op; in btrfs_add_delayed_extent_op()
894 add_delayed_ref_head(fs_info, trans, &head_ref->node, bytenr, in btrfs_add_delayed_extent_op()