From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 4F9191FF0B7 for ; Fri, 30 Oct 2026 11:12:08 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 15C642166C; Fri, 30 Oct 2026 11:11:41 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server v5 0/4] hotplug: improve and fix cleanup/error handling Date: Fri, 30 Oct 2026 11:04:39 +0100 Message-ID: <20261030101134.2090350-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.346 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: I52KF5BW4UJH6S3CE7QYKE3MF3IBMUXM X-Message-ID-Hash: I52KF5BW4UJH6S3CE7QYKE3MF3IBMUXM X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This replaces my earlier v4 9/9 patch[0] It uses a different approach now by unifying the cleanup and removal of disks and their controllers. It also fixes a related bug in 1/4 that was uncovered. changes from v4: * rebase on master * new bugfix (1/4) * new patch for iothread deletion * new patch for refactoring the cleanup 0: https://lore.proxmox.com/pve-devel/20261023130324.451252-10-d.csapak@proxmox.com/ Dominik Csapak (4): hotplug: scsi: only keep controller if a disk on it is still present hotplug: remove iothread with virtio-scsi controller together hotplug: factor out cleanup of disk devices hotplug: clean up disk devices/objects if adding them failed src/PVE/QemuServer.pm | 107 ++++++++++-------- src/test/hotplug/disk-add-fail.conf | 19 ++++ src/test/hotplug/disk-add-fail.conf.expected | 10 ++ .../disk-add-scsi-single-disk-fail.conf | 19 ++++ ...sk-add-scsi-single-disk-fail.conf.expected | 12 ++ .../hotplug/disk-add-scsi-single-fail.conf | 19 ++++ .../disk-add-scsi-single-fail.conf.expected | 5 + .../hotplug/disk-remove-lsi-last-slot.conf | 16 +++ .../disk-remove-lsi-last-slot.conf.expected | 3 + .../disk-remove-lsi-second-controller.conf | 16 +++ ...remove-lsi-second-controller.conf.expected | 4 + 11 files changed, 183 insertions(+), 47 deletions(-) create mode 100644 src/test/hotplug/disk-add-fail.conf create mode 100644 src/test/hotplug/disk-add-fail.conf.expected create mode 100644 src/test/hotplug/disk-add-scsi-single-disk-fail.conf create mode 100644 src/test/hotplug/disk-add-scsi-single-disk-fail.conf.expected create mode 100644 src/test/hotplug/disk-add-scsi-single-fail.conf create mode 100644 src/test/hotplug/disk-add-scsi-single-fail.conf.expected create mode 100644 src/test/hotplug/disk-remove-lsi-last-slot.conf create mode 100644 src/test/hotplug/disk-remove-lsi-last-slot.conf.expected create mode 100644 src/test/hotplug/disk-remove-lsi-second-controller.conf create mode 100644 src/test/hotplug/disk-remove-lsi-second-controller.conf.expected -- 2.47.3