[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/2] blockdev: add sync mode to drive-backup
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/2] blockdev: add sync mode to drive-backup QMP command |
Date: |
Wed, 10 Jul 2013 08:31:25 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 |
On 06/26/2013 06:11 AM, Stefan Hajnoczi wrote:
> The drive-backup command is similar to the drive-mirror command, except
> no guest data written after the command executes gets copied. Add a
> sync mode argument which determines whether the entire disk is copied,
> just allocated clusters, or only clusters being written to by the guest.
>
> Currently only sync mode 'full' is supported - it copies the entire disk.
> For read-only point-in-time snapshots we may only need sync mode 'none'
> since the target can be a qcow2 file using the guest's disk as its
> backing file (no need to copy the entire disk). Finally, sync mode
> 'top' is useful if we wish to preserve the backing chain.
>
> Note that this patch just adds the sync mode argument to drive-backup.
> It does not implement sync modes 'top' or 'none'. This patch is
> necessary so we can add a drive-backup HMP command that behaves like the
> existing drive-mirror HMP command and takes a sync mode.
>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> +++ b/qapi-schema.json
> @@ -1626,6 +1626,10 @@
> # @format: #optional the format of the new destination, default is to
> # probe if @mode is 'existing', else the format of the source
> #
> +# @sync: what parts of the disk image should be copied to the destination
> +# (all the disk, only the sectors allocated in the topmost image, or
> +# only new I/O).
> +#
> # @mode: #optional whether and how QEMU should create a new image, default is
> # 'absolute-paths'.
> #
> @@ -1647,7 +1651,8 @@
> ##
> { 'type': 'DriveBackup',
> 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
> - '*mode': 'NewImageMode', '*speed': 'int',
> + 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
Making it mandatory is fine, since the command is new to 1.6 (if this
were after 1.6, we'd have to make it optional).
> #
> +# @sync: what parts of the disk image should be copied to the destination
> +# (all the disk, only the sectors allocated in the topmost image, or
> +# only new I/O).
This duplication will conflict with Kevin's patch currently on the qmp
queue for 'qapi-schema: Use existing type for drive-backup arguments';
you may want to coordinate which series gets merged first, and rebase
the other one appropriately.
If you do rebase, feel free to add:
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v2 1/2] blockdev: add sync mode to drive-backup QMP command,
Eric Blake <=