]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Always re-detect backing chain
authorPeter Krempa <pkrempa@redhat.com>
Thu, 25 Sep 2014 15:30:28 +0000 (17:30 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 26 Sep 2014 07:35:33 +0000 (09:35 +0200)
Since 363e9a68 we track backing chain metadata when creating snapshots
the right way even for the inactive configuration. As we did not yet
update other code paths that modify the backing chain (blockpull) the
newDef backing chain gets out of sync.

After stopping of a VM the new definition gets copied to the next start
one. The new VM then has incorrect backing chain info. This patch
switches the backing chain detector to always purge the existing backing
chain and forces re-detection to avoid this issue until we'll have full
backing chain tracking support.

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

src/qemu/qemu_domain.c

index 11145d1999537101bc83900301db3c2642d63b22..76fcccec96296da3a0a49999a827bba46e7e52b7 100644 (file)
@@ -2540,7 +2540,7 @@ qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
             virFileExists(virDomainDiskGetSource(disk)))
             continue;
 
-        if (qemuDomainDetermineDiskChain(driver, vm, disk, false, true) >= 0)
+        if (qemuDomainDetermineDiskChain(driver, vm, disk, true, true) >= 0)
             continue;
 
         if (disk->startupPolicy &&