[PATCH v2] qemu: don't check for backing chains for formats w/o snapshot support

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

 



Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1019926
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=868673

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---

Notes:
    Smaller and cleaner variant of v1 [1] after discussion with Eric
    
    [1] https://www.redhat.com/archives/libvir-list/2014-April/msg00716.html

 src/qemu/qemu_domain.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 45ed872..5687075 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2268,11 +2268,14 @@ qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
     VIR_DEBUG("Checking for disk presence");
     for (i = vm->def->ndisks; i > 0; i--) {
         disk = vm->def->disks[i - 1];
+        enum virStorageFileFormat format = virDomainDiskGetFormat(disk);

         if (!virDomainDiskGetSource(disk))
             continue;

-        if (qemuDomainDetermineDiskChain(driver, vm, disk, false) >= 0 &&
+        if ((format < VIR_STORAGE_FILE_NONE ||
+             format >= VIR_STORAGE_FILE_BACKING) &&
+            qemuDomainDetermineDiskChain(driver, vm, disk, false) >= 0 &&
             qemuDiskChainCheckBroken(disk) >= 0)
             continue;

-- 
1.9.2

--
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]