Lines Matching defs:existing
584 * Return true if the ref was merged into an existing one (and therefore can be
627 /* remove existing tail if its ref_mod is zero */
636 * existing and update must have the same bytenr
639 struct btrfs_delayed_ref_head *existing,
647 BUG_ON(existing->is_data != update->is_data);
649 spin_lock(&existing->lock);
654 * with an existing head ref without
658 existing->must_insert_reserved = update->must_insert_reserved;
664 existing->num_bytes = update->num_bytes;
669 if (!existing->extent_op) {
670 existing->extent_op = update->extent_op;
673 memcpy(&existing->extent_op->key,
676 existing->extent_op->update_key = true;
679 existing->extent_op->flags_to_set |=
681 existing->extent_op->update_flags = true;
691 old_ref_mod = existing->total_ref_mod;
692 existing->ref_mod += update->ref_mod;
693 existing->total_ref_mod += update->ref_mod;
699 if (existing->is_data) {
702 existing->num_bytes);
704 if (existing->total_ref_mod >= 0 && old_ref_mod < 0) {
705 delayed_refs->pending_csums -= existing->num_bytes;
708 if (existing->total_ref_mod < 0 && old_ref_mod >= 0) {
709 delayed_refs->pending_csums += existing->num_bytes;
714 spin_unlock(&existing->lock);
794 struct btrfs_delayed_ref_head *existing;
811 existing = htree_insert(&delayed_refs->href_root,
813 if (existing) {
814 update_existing_head_ref(trans, existing, head_ref);
816 * we've updated the existing ref, free the newly
820 head_ref = existing;