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

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



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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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