[PATCH 59/80] qemuDomainRemoveDiskDevice: Remove special casing for disks on 'sd' bus

Peter Krempa posted 80 patches 3 years, 4 months ago
[PATCH 59/80] qemuDomainRemoveDiskDevice: Remove special casing for disks on 'sd' bus
Posted by Peter Krempa 3 years, 4 months ago
SD card disks can't be detached, so it makes no sense to special case
them in the unplug code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index a57db12144..3c35a115e3 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -4299,7 +4299,7 @@ qemuDomainRemoveDiskDevice(virQEMUDriver *driver,

         if (!(diskBackend = qemuBlockStorageSourceChainDetachPrepareChardev(chardevAlias)))
             goto cleanup;
-    } else if (blockdev && !qemuDiskBusIsSD(disk->bus)) {
+    } else if (blockdev) {
         if (diskPriv->blockjob) {
             /* the block job keeps reference to the disk chain */
             diskPriv->blockjob->disk = NULL;
-- 
2.36.1
Re: [PATCH 59/80] qemuDomainRemoveDiskDevice: Remove special casing for disks on 'sd' bus
Posted by Pavel Hrdina 3 years, 4 months ago
On Tue, Jul 26, 2022 at 04:37:37PM +0200, Peter Krempa wrote:
> SD card disks can't be detached, so it makes no sense to special case
> them in the unplug code.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>  src/qemu/qemu_hotplug.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>