[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 27/47] block: introduce mirror job
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 27/47] block: introduce mirror job |
Date: |
Wed, 25 Jul 2012 17:02:10 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
On 07/24/2012 05:04 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. This can be used for several
> purposes, including storage migration, continuous replication, and
> observation of the guest I/O in an external program. It is also a
> first step in replacing the inefficient block migration code that is
> part of QEMU.
>
> The job is possibly never-ending, but it is logically structured into
> +++ b/block/mirror.c
> +
> + /* 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.
> + */
Stale comment - isn't it now 'block-job-complete' instead of 'drive-reopen'?
> +++ b/block_int.h
> @@ -305,4 +305,24 @@ void stream_start(BlockDriverState *bs, BlockDriverState
> *base,
> BlockDriverCompletionFunc *cb,
> void *opaque, Error **errp);
>
> +/**
> + * mirror_start:
> + * @bs: Block device to operate on.
> + * @target: Block device to write to.
> + * @speed: The maximum speed, in bytes per second, or 0 for unlimited.
> + * @mode: Whether to collapse all images in the chain to the target.
> + * @cb: Completion function for the job.
> + * @opaque: Opaque pointer value passed to @cb.
> + * @errp: Error object.
> + *
> + * Start a mirroring operation on @bs. Clusters that are allocated
> + * in @bs will be written to @bs until the job is canceled or
I've messed you up - you've got 'canceled' and 'cancelled' in different
comments within the same patch :)
I've now reviewed the series up to this point, with no findings on the
patches where I did not reply.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 13/47] block: introduce block job error, (continued)
- [Qemu-devel] [PATCH 11/47] block: reorganize io error code, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 16/47] qemu-iotests: map underscore to dash in QMP argument names, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 15/47] blkdebug: process all set_state rules in the old state, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 14/47] stream: add on-error argument, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 19/47] block: add bdrv_query_info, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 20/47] block: add bdrv_query_stats, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 26/47] block: introduce BLOCK_JOB_READY event, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 27/47] block: introduce mirror job, Paolo Bonzini, 2012/07/24
- Re: [Qemu-devel] [PATCH 27/47] block: introduce mirror job,
Eric Blake <=
- [Qemu-devel] [PATCH 29/47] mirror: support querying target file, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 31/47] qemu-iotests: add mirroring test case, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 33/47] mirror: add support for on-source-error/on-target-error, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 32/47] block: forward bdrv_iostatus_reset to block job, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 34/47] qmp: add pull_event function, Paolo Bonzini, 2012/07/24
- [Qemu-devel] [PATCH 37/47] add hierarchical bitmap data type and test cases, Paolo Bonzini, 2012/07/24