]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: block-commit: Mark disk in block jobs only on successful command
authorPeter Krempa <pkrempa@redhat.com>
Mon, 16 Mar 2015 15:52:44 +0000 (16:52 +0100)
committerCole Robinson <crobinso@redhat.com>
Wed, 23 Dec 2015 23:06:59 +0000 (18:06 -0500)
Patch 51f9f03a4ca50b070c0fbfb29748d49f583e15e1 introduces a regression
where if a blockCommit operation fails the disk is still marked as being
part of a block job but can't be unmarked later.

(cherry picked from commit ee744b5b387b5123ee40683c52ab40783ffc3020)

src/qemu/qemu_driver.c

index 0d30b00a201664cfd1f6b0881d5628d2e238b038..960f66ca9205cfe218cfd98381a45e0eadf16430 100644 (file)
@@ -16781,7 +16781,8 @@ qemuDomainBlockCommit(virDomainPtr dom,
         goto endjob;
     }
 
-    disk->blockjob = true;
+    if (ret == 0)
+        disk->blockjob = true;
 
     if (mirror) {
         if (ret == 0) {