From 826bf4c001e1190982e500c6d88c0513d3e507ce Mon Sep 17 00:00:00 2001 Message-Id: <826bf4c001e1190982e500c6d88c0513d3e507ce@dist-git> From: Peter Krempa Date: Tue, 17 Mar 2015 13:13:54 +0100 Subject: [PATCH] qemu: block-commit: Mark disk in block jobs only on successful command https://bugzilla.redhat.com/show_bug.cgi?id=1202719 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) Signed-off-by: Jiri Denemark --- 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 2bd4a1d..9dc243a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16354,7 +16354,8 @@ qemuDomainBlockCommit(virDomainPtr dom, bandwidth); qemuDomainObjExitMonitor(driver, vm); - disk->blockjob = true; + if (ret == 0) + disk->blockjob = true; if (mirror) { if (ret == 0) { -- 2.3.3