freenas-proxmox/perl5/PVE
Kevin Adams 0dea6bc078 fix: delete all targetextent associations in free_image (#265)
_find_extent returned only the first targetextent row for an extent.
If duplicate rows exist (from a prior failed alloc_image leaving an
orphan), free_image deleted one association and then hit a 422 on the
extent DELETE because TrueNAS still saw the second association as
keeping the target in use.

Return all rows in a new targetextents field and loop over them in
free_image so every association is removed before the extent DELETE.

Fixes: 422 Unprocessable Entity on free_image (SCALE 24.10, vm-103-disk-3)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 17:31:02 -04:00
..
Storage/Custom fix: delete all targetextent associations in free_image (#265) 2026-05-27 17:31:02 -04:00