[PATCH 14/15] qemu: Do not restore unpriv_sgio if the disk is shared by other domain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just like for domain shutdown, this prevents restoring the disk's
unpriv_sgio if it's being shared by other domain(s).
---
 src/qemu/qemu_driver.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 7288ad6..153e780 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6201,7 +6201,11 @@ qemuDomainDetachDeviceDiskLive(virQEMUDriverPtr driver,
 
     if (ret == 0) {
         /* Restore the disk's unpriv_sgio */
-        if (disk->cdbfilter) {
+        if (disk->cdbfilter &&
+            !qemuSharedDiskListFind(driver->sharedDisks,
+                                    disk->src,
+                                    NULL,
+                                    NULL)) {
             int val;
 
             if (disk->old_cdbfilter == VIR_DOMAIN_DISK_CDB_FILTER_YES)
-- 
1.7.7.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]