Lines Matching defs:existing

683  * Return true if the ref was merged into an existing one (and therefore can be
728 /* remove existing tail if its ref_mod is zero */
737 * existing and update must have the same bytenr
740 struct btrfs_delayed_ref_head *existing,
748 BUG_ON(existing->is_data != update->is_data);
750 spin_lock(&existing->lock);
757 if (!existing->owning_root)
758 existing->owning_root = update->owning_root;
764 * with an existing head ref without
768 existing->must_insert_reserved = update->must_insert_reserved;
769 existing->owning_root = update->owning_root;
775 existing->num_bytes = update->num_bytes;
780 if (!existing->extent_op) {
781 existing->extent_op = update->extent_op;
784 memcpy(&existing->extent_op->key,
787 existing->extent_op->update_key = true;
790 existing->extent_op->flags_to_set |=
792 existing->extent_op->update_flags = true;
802 old_ref_mod = existing->total_ref_mod;
803 existing->ref_mod += update->ref_mod;
804 existing->total_ref_mod += update->ref_mod;
812 if (existing->is_data) {
815 existing->num_bytes);
817 if (existing->total_ref_mod >= 0 && old_ref_mod < 0) {
818 delayed_refs->pending_csums -= existing->num_bytes;
821 if (existing->total_ref_mod < 0 && old_ref_mod >= 0) {
822 delayed_refs->pending_csums += existing->num_bytes;
827 spin_unlock(&existing->lock);
909 struct btrfs_delayed_ref_head *existing;
926 existing = htree_insert(&delayed_refs->href_root,
928 if (existing) {
929 update_existing_head_ref(trans, existing, head_ref);
931 * we've updated the existing ref, free the newly
935 head_ref = existing;