[libvirt] [PATCH] qemu: block-commit: Mark disk in block jobs only on successful command

Peter Krempa pkrempa at redhat.com
Mon Mar 16 15:55:22 UTC 2015


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.
---
 src/qemu/qemu_driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 7ca993d..4b8e104 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17086,7 +17086,8 @@ qemuDomainBlockCommit(virDomainPtr dom,
         goto endjob;
     }

-    disk->blockjob = true;
+    if (ret == 0)
+        disk->blockjob = true;

     if (mirror) {
         if (ret == 0) {
-- 
2.2.2




More information about the libvir-list mailing list