From: Peter Krempa Date: Tue, 3 Feb 2026 16:41:21 +0000 (+0100) Subject: qemuProcessRefreshDiskProps: Drop code to remove disk source X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56f7dd88d444b7c1277f3509cda804808db37319;p=thirdparty%2Flibvirt.git qemuProcessRefreshDiskProps: Drop code to remove disk source In blockdev mode, the guest OS can't force the drive to become empty (opening cdrom tray doesn't remove media; floppies can't be ejected from guest OS), so the check if a drive is empty is dead code at this point. Remove it. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index fba1dbe844..c130483659 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -9544,9 +9544,6 @@ qemuProcessRefreshDiskProps(virDomainDiskDef *disk, qemuDomainDiskPrivate *diskpriv = QEMU_DOMAIN_DISK_PRIVATE(disk); if (info->removable) { - if (info->empty) - virDomainDiskEmptySource(disk); - if (info->tray) { if (info->tray_open) disk->tray_status = VIR_DOMAIN_DISK_TRAY_OPEN;