|
|
9119d9 |
From fc6343d89ff8c0a14d07ccfa538e11c82ae266bd Mon Sep 17 00:00:00 2001
|
|
|
9119d9 |
Message-Id: <fc6343d89ff8c0a14d07ccfa538e11c82ae266bd@dist-git>
|
|
|
9119d9 |
From: Erik Skultety <eskultet@redhat.com>
|
|
|
9119d9 |
Date: Thu, 27 Nov 2014 13:29:42 +0100
|
|
|
9119d9 |
Subject: [PATCH] qemu: fix block{commit,copy} abort handling
|
|
|
9119d9 |
|
|
|
9119d9 |
When a block{commit,copy} job was aborted on a domain, block job handler
|
|
|
9119d9 |
did not process it correctly, leaving a phantom job in the background.
|
|
|
9119d9 |
Any further calls to any blockjob causes "block <jobtype> still active"
|
|
|
9119d9 |
error. This patch fixes the blockjob handler so that it checks not only
|
|
|
9119d9 |
for VIR_DOMAIN_BLOCK_JOB_FAILED status, but VIR_DOMAIN_BLOCK_JOB_CANCELED
|
|
|
9119d9 |
status as well, followed by our existing cleanup routine.
|
|
|
9119d9 |
|
|
|
9119d9 |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1135169
|
|
|
9119d9 |
|
|
|
9119d9 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
(cherry picked from commit 8e23e0e977fbcc4a7880e187a63c509d6e6879c6)
|
|
|
9119d9 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
---
|
|
|
9119d9 |
src/qemu/qemu_process.c | 3 ++-
|
|
|
9119d9 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
9119d9 |
|
|
|
9119d9 |
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
|
9119d9 |
index 1125f4c..904af95 100644
|
|
|
9119d9 |
--- a/src/qemu/qemu_process.c
|
|
|
9119d9 |
+++ b/src/qemu/qemu_process.c
|
|
|
9119d9 |
@@ -1103,7 +1103,8 @@ qemuProcessHandleBlockJob(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|
|
9119d9 |
if (status == VIR_DOMAIN_BLOCK_JOB_READY) {
|
|
|
9119d9 |
disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_READY;
|
|
|
9119d9 |
save = true;
|
|
|
9119d9 |
- } else if (status == VIR_DOMAIN_BLOCK_JOB_FAILED) {
|
|
|
9119d9 |
+ } else if (status == VIR_DOMAIN_BLOCK_JOB_FAILED ||
|
|
|
9119d9 |
+ status == VIR_DOMAIN_BLOCK_JOB_CANCELED) {
|
|
|
9119d9 |
virStorageSourceFree(disk->mirror);
|
|
|
9119d9 |
disk->mirror = NULL;
|
|
|
9119d9 |
disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_NONE;
|
|
|
9119d9 |
--
|
|
|
9119d9 |
2.1.3
|
|
|
9119d9 |
|