qemu-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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