[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 22/36] block: add mirror job
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [RFC PATCH 22/36] block: add mirror job |
Date: |
Fri, 15 Jun 2012 12:20:23 -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:
> This patch adds the implementation of a new job that mirrors a disk to
> a new image while letting the guest continue using the old image.
> The target is treated as a "black box" and data is copied from the
> source to the target in the background.
>
> The mirror job is never-ending, but it is logically structured into
> two phases: 1) copy all data as fast as possible until the target
> first gets in sync with the source; 2) keep target in sync and
> ensure that reopening to the target gets a correct (full) copy
> of the source data.
>
> The second phase is indicated by the progress in "info block-jobs"
> reporting the current offset to be equal to the length of the file.
> When the job is cancelled in the second phase, QEMU will run the
> job until the source is clean and quiescent, then it will report
> successful completion of the job. (Note that it could already happen
> that management lost the race against QEMU and got a completion
> event instead of cancellation).
Is this paragraph still accurate? At any rate, it sounds a bit
confusing - if I run 'block-job-cancel', do I get a 'complete' or a
'cancelled' event? Or is it a question of _which_ event I get depending
on how a race goes?
> +
> + if (bdrv_get_dirty_count(bs) == 0) {
> + /* We're out of the streaming phase. From now on, if the
> + * job is cancelled we will actually complete all pending
> + * I/O and report completion, so that drive-reopen can be
> + * used to pivot to the mirroring target.
> + */
Comment is out of date since you are no longer proposing a drive-reopen,
but block-job-complete.
> ##
> +# @MirrorSyncMode:
> +#
> +# An enumeration of possible behaviors for the initial synchronization
> +# phase of storage mirroring.
> +#
> +# @top: copies data in the topmost image to the destination
> +#
> +# @full: copies data from all images to the destination
Do we ever want to support partial mirroring, the way we support partial
block-stream? That is, given:
A <- B <- C
and creating a copy D, 'top' means D has B as a backing file, 'full'
means D has no backing file, but to create D with A as a backing file, I
would instead have to do a 'top' mirror, then complete, then do a
regular block-stream for a partial pull.
Deciding whether to support partial block mirror with anything more than
top but less than full will impact whether my proposed libvirt
virDomainBlockCopy() command needs an extra argument for naming the new
base file in a partial mirror.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [RFC PATCH 09/36] block: rename BlockErrorAction, BlockQMPEventAction, (continued)
- [Qemu-devel] [RFC PATCH 09/36] block: rename BlockErrorAction, BlockQMPEventAction, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 12/36] block: sort BlockDeviceIoStatus errors by severity, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 11/36] block: reorganize io error code, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 15/36] qemu-iotests: add tests for streaming error handling, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 13/36] block: introduce block job error, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 20/36] block: forward bdrv_iostatus_reset to block job, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 21/36] block: introduce new dirty bitmap functionality, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 22/36] block: add mirror job, Paolo Bonzini, 2012/06/15
- Re: [Qemu-devel] [RFC PATCH 22/36] block: add mirror job,
Eric Blake <=
- [Qemu-devel] [RFC PATCH 19/36] block: add target info to QMP query-blockjobs command, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 25/36] mirror: add support for on_source_error/on_target_error, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 24/36] mirror: support querying target file, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 29/36] mirror: implement completion, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 34/36] block: return count of dirty sectors, not chunks, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 33/36] mirror: perform COW if the cluster size is bigger than the granularity, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 26/36] block: live snapshot documentation tweaks, Paolo Bonzini, 2012/06/15
- [Qemu-devel] [RFC PATCH 35/36] block: allow customizing the granularity of the dirty bitmap, Paolo Bonzini, 2012/06/15