render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
99cbc7
From fd6730d460560af166d953e8daf8b68df84e030e Mon Sep 17 00:00:00 2001
99cbc7
Message-Id: <fd6730d460560af166d953e8daf8b68df84e030e@dist-git>
99cbc7
From: Peter Krempa <pkrempa@redhat.com>
99cbc7
Date: Thu, 11 Apr 2019 15:14:13 -0400
99cbc7
Subject: [PATCH] qemu: hotplug: Don't generate alias when detaching disk
99cbc7
MIME-Version: 1.0
99cbc7
Content-Type: text/plain; charset=UTF-8
99cbc7
Content-Transfer-Encoding: 8bit
99cbc7
99cbc7
It should be impossible to lack an alias in the domain definition. Other
99cbc7
disk types don't generate it so remove it here as well.
99cbc7
99cbc7
Partially-Resolves: https://bugzilla.redhat.com/1658198
99cbc7
99cbc7
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
99cbc7
Reviewed-by: Ján Tomko <jtomko@redhat.com>
99cbc7
(cherry picked from commit 2bd9db9659f58864b01f7f51b414e54f45d8d368)
99cbc7
99cbc7
Signed-off-by: Laine Stump <laine@redhat.com>
99cbc7
Signed-off-by: Laine Stump <laine@laine.org>
99cbc7
Message-Id: <20190411191453.24055-2-laine@redhat.com>
99cbc7
Acked-by: Michal Privoznik <mprivozn@redhat.com>
99cbc7
---
99cbc7
 src/qemu/qemu_hotplug.c | 5 -----
99cbc7
 1 file changed, 5 deletions(-)
99cbc7
99cbc7
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
99cbc7
index 397a2bdde2..15d845e7b8 100644
99cbc7
--- a/src/qemu/qemu_hotplug.c
99cbc7
+++ b/src/qemu/qemu_hotplug.c
99cbc7
@@ -4685,11 +4685,6 @@ qemuDomainDetachVirtioDiskDevice(virQEMUDriverPtr driver,
99cbc7
         goto cleanup;
99cbc7
     }
99cbc7
 
99cbc7
-    if (!detach->info.alias) {
99cbc7
-        if (qemuAssignDeviceDiskAlias(vm->def, detach) < 0)
99cbc7
-            goto cleanup;
99cbc7
-    }
99cbc7
-
99cbc7
     if (!async)
99cbc7
         qemuDomainMarkDeviceForRemoval(vm, &detach->info);
99cbc7
 
99cbc7
-- 
99cbc7
2.21.0
99cbc7