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