[Top][All Lists]
[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [RFC PATCH 36/36] mirror: allow customizing the granularity, (continued)
- [Qemu-devel] [RFC PATCH 36/36] mirror: allow customizing the granularity, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 17/36] block: add bdrv_query_stats, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 30/36] add hierarchical bitmap data type and test cases, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 18/36] block: make device optional in BlockInfo, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 16/36] block: add bdrv_query_info, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 31/36] block: implement dirty bitmap using HBitmap, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 27/36] block: add bdrv_ensure_backing_file, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 28/36] block: add block-job-complete, Paolo Bonzini, 2012/06/15
- Re: [Qemu-devel] [RFC PATCH 28/36] block: add block-job-complete,
Eric Blake <=
- [Qemu-devel] [RFC PATCH 32/36] block: make round_to_clusters public, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 23/36] qmp: add drive-mirror command, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 14/36] stream: add on_error argument, Paolo Bonzini, 2012/06/15