• Home
  • Raw
  • Download

Lines Matching full:existing

632 	/* remove existing tail if its ref_mod is zero */  in insert_delayed_ref()
647 * existing and update must have the same bytenr
650 struct btrfs_delayed_ref_head *existing, in update_existing_head_ref() argument
656 u64 flags = btrfs_ref_head_to_space_flags(existing); in update_existing_head_ref()
659 BUG_ON(existing->is_data != update->is_data); in update_existing_head_ref()
661 spin_lock(&existing->lock); in update_existing_head_ref()
666 * with an existing head ref without in update_existing_head_ref()
670 existing->must_insert_reserved = update->must_insert_reserved; in update_existing_head_ref()
676 existing->num_bytes = update->num_bytes; in update_existing_head_ref()
681 if (!existing->extent_op) { in update_existing_head_ref()
682 existing->extent_op = update->extent_op; in update_existing_head_ref()
685 memcpy(&existing->extent_op->key, in update_existing_head_ref()
688 existing->extent_op->update_key = true; in update_existing_head_ref()
691 existing->extent_op->flags_to_set |= in update_existing_head_ref()
693 existing->extent_op->update_flags = true; in update_existing_head_ref()
703 old_ref_mod = existing->total_ref_mod; in update_existing_head_ref()
704 existing->ref_mod += update->ref_mod; in update_existing_head_ref()
705 existing->total_ref_mod += update->ref_mod; in update_existing_head_ref()
711 if (existing->is_data) { in update_existing_head_ref()
714 existing->num_bytes); in update_existing_head_ref()
716 if (existing->total_ref_mod >= 0 && old_ref_mod < 0) { in update_existing_head_ref()
717 delayed_refs->pending_csums -= existing->num_bytes; in update_existing_head_ref()
720 if (existing->total_ref_mod < 0 && old_ref_mod >= 0) { in update_existing_head_ref()
721 delayed_refs->pending_csums += existing->num_bytes; in update_existing_head_ref()
739 if (existing->total_ref_mod < 0 && old_ref_mod >= 0) in update_existing_head_ref()
740 btrfs_mod_total_bytes_pinned(fs_info, flags, existing->num_bytes); in update_existing_head_ref()
741 else if (existing->total_ref_mod >= 0 && old_ref_mod < 0) in update_existing_head_ref()
742 btrfs_mod_total_bytes_pinned(fs_info, flags, -existing->num_bytes); in update_existing_head_ref()
743 else if (existing->total_ref_mod == 0 && existing->must_insert_reserved) in update_existing_head_ref()
744 btrfs_mod_total_bytes_pinned(fs_info, flags, existing->num_bytes); in update_existing_head_ref()
746 spin_unlock(&existing->lock); in update_existing_head_ref()
822 struct btrfs_delayed_ref_head *existing; in add_delayed_ref_head() local
839 existing = htree_insert(&delayed_refs->href_root, in add_delayed_ref_head()
841 if (existing) { in add_delayed_ref_head()
842 update_existing_head_ref(trans, existing, head_ref); in add_delayed_ref_head()
844 * we've updated the existing ref, free the newly in add_delayed_ref_head()
848 head_ref = existing; in add_delayed_ref_head()