Re: [PATCH] qemu: Un-mark volume as mirrored/copied if blockjob copy fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/20/13 18:24, Eric Blake wrote:
On 03/20/2013 09:53 AM, Peter Krempa wrote:
When the blockjob fails for some reason an event is emitted but the disk
wasn't unmarked as being part of a active block copy operation.
---
  src/qemu/qemu_process.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 2465938..ada864b 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -970,6 +970,9 @@ qemuProcessHandleBlockJob(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
          if (disk->mirror && type == VIR_DOMAIN_BLOCK_JOB_TYPE_COPY &&
              status == VIR_DOMAIN_BLOCK_JOB_READY)
              disk->mirroring = true;
+        if (disk->mirror && type == VIR_DOMAIN_BLOCK_JOB_TYPE_COPY &&
+            status == VIR_DOMAIN_BLOCK_JOB_FAILED)
+            VIR_FREE(disk->mirror);

ACK.


Pushed; Thanks.

Peter

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]