Lines Matching defs:existing

658  * Return true if the ref was merged into an existing one (and therefore can be
703 /* remove existing tail if its ref_mod is zero */
712 * existing and update must have the same bytenr
715 struct btrfs_delayed_ref_head *existing,
723 BUG_ON(existing->is_data != update->is_data);
725 spin_lock(&existing->lock);
732 if (!existing->owning_root)
733 existing->owning_root = update->owning_root;
739 * with an existing head ref without
743 existing->must_insert_reserved = update->must_insert_reserved;
744 existing->owning_root = update->owning_root;
750 existing->num_bytes = update->num_bytes;
755 if (!existing->extent_op) {
756 existing->extent_op = update->extent_op;
759 memcpy(&existing->extent_op->key,
762 existing->extent_op->update_key = true;
765 existing->extent_op->flags_to_set |=
767 existing->extent_op->update_flags = true;
777 old_ref_mod = existing->total_ref_mod;
778 existing->ref_mod += update->ref_mod;
779 existing->total_ref_mod += update->ref_mod;
787 if (existing->is_data) {
790 existing->num_bytes);
792 if (existing->total_ref_mod >= 0 && old_ref_mod < 0) {
793 delayed_refs->pending_csums -= existing->num_bytes;
796 if (existing->total_ref_mod < 0 && old_ref_mod >= 0) {
797 delayed_refs->pending_csums += existing->num_bytes;
802 spin_unlock(&existing->lock);
886 struct btrfs_delayed_ref_head *existing;
903 existing = htree_insert(&delayed_refs->href_root,
905 if (existing) {
906 update_existing_head_ref(trans, existing, head_ref);
908 * we've updated the existing ref, free the newly
912 head_ref = existing;