Lines Matching refs:head

57  * Release a ref head's reservation.
63 * Drops the delayed ref head's count from the delayed refs rsv and free any
383 /* insert a new ref to head ref rbtree */
463 * Find a head entry based on bytenr. This returns the delayed ref head if it
501 struct btrfs_delayed_ref_head *head)
504 if (mutex_trylock(&head->mutex))
507 refcount_inc(&head->refs);
510 mutex_lock(&head->mutex);
512 if (RB_EMPTY_NODE(&head->href_node)) {
513 mutex_unlock(&head->mutex);
514 btrfs_put_delayed_ref_head(head);
517 btrfs_put_delayed_ref_head(head);
523 struct btrfs_delayed_ref_head *head,
526 lockdep_assert_held(&head->lock);
527 rb_erase_cached(&ref->ref_node, &head->ref_tree);
538 struct btrfs_delayed_ref_head *head,
566 drop_delayed_ref(fs_info, delayed_refs, head, next);
569 drop_delayed_ref(fs_info, delayed_refs, head, ref);
585 struct btrfs_delayed_ref_head *head)
591 lockdep_assert_held(&head->lock);
593 if (RB_EMPTY_ROOT(&head->ref_tree.rb_root))
597 if (head->is_data)
602 for (node = rb_first_cached(&head->ref_tree); node;
607 if (merge_ref(fs_info, delayed_refs, head, ref, seq))
630 struct btrfs_delayed_ref_head *head;
634 head = find_ref_head(delayed_refs, delayed_refs->run_delayed_start,
636 if (!head && delayed_refs->run_delayed_start != 0) {
638 head = find_first_ref_head(delayed_refs);
640 if (!head)
643 while (head->processing) {
646 node = rb_next(&head->href_node);
653 head = rb_entry(node, struct btrfs_delayed_ref_head,
657 head->processing = true;
660 delayed_refs->run_delayed_start = head->bytenr +
661 head->num_bytes;
662 return head;
666 struct btrfs_delayed_ref_head *head)
669 lockdep_assert_held(&head->lock);
671 rb_erase_cached(&head->href_node, &delayed_refs->href_root);
672 RB_CLEAR_NODE(&head->href_node);
675 if (!head->processing)
736 * helper function to update the accounting in the head ref
764 * with an existing head ref without
798 * update the reference mod on the head to reflect this new operation,
809 * We reserve bytes for csum deletion when adding or updating a ref head
848 * The head node stores the sum of all the mods, so dropping a ref
849 * should drop the sum in the head node by one.
899 * helper function to actually insert a head node into the rbtree.
939 * adding the ref head and not when adding individual drop refs
1120 * insert both the head node and the new ref without dropping
1211 * insert both the head node and the new ref without dropping
1289 * This does a simple search for the head node for a given extent. Returns the
1290 * head node if found, or NULL if not.