qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH 28/36] block: add block-job-complete


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC PATCH 28/36] block: add block-job-complete
Date: Fri, 15 Jun 2012 15:42:16 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 06/15/2012 09:05 AM, Paolo Bonzini wrote:
> While streaming can be dropped as soon as it progressed through the whole
> image, mirroring needs to be completed manually for two reasons: 1) so that
> management knows exactly when the VM switches to the target; 2) because
> for other use cases such as replication, we may leave the operation running
> for the whole life of the virtual machine.
> 
> Add a new block job command that manually completes background operations.
> 


>  ##
> +# @block-job-complete:
> +#
> +# Manually trigger completion of an active background block operation.  This
> +# is supported for drive mirroring, where it also switches the device to
> +# write to the target path only.
> +#
> +# This command completes an active background block operation synchronously.
> +# The ordering of this command's return with the BLOCK_JOB_COMPLETED event
> +# is not defined.  Note that if an I/O error occurs during the processing of
> +# this command: 1) the command itself will fail; 2) the error will be 
> processed
> +# according to the rerror/werror arguments that were specified when starting
> +# the operation.
> +#
> +# A cancelled or paused job cannot be completed.

US vs. UK spelling.

So 'block-job-complete' ends by pivoting or errors because it is not
ready, 'block-job-cancel' without force ends with a clean mirror without
pivoting or errors because it is not ready, and 'block-job-cancel' with
force ends no matter what, even if it means a non-clean mirror.  I think
that was all the cases I asked for regarding a single disk.  And
hopefully we still have time to add additional patches to also support
'transaction' of combinations of these block actions across multiple disks.

> +#
> +# @device: the device name
> +#
> +# Returns: Nothing on success
> +#          If no background operation is active on this device, 
> BlockJobNotActive
> +#          If the operation cannot be completed manually (either in general, 
> or
> +#            not at the time the command is invoked), BlockJobNotReady
> +#
> +# Since: 1.1

1.2

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]