From: Eric Blake <eblake@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
imain@redhat.com, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org
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 [thread overview]
Message-ID: <51DD703D.1060602@redhat.com> (raw)
In-Reply-To: <1372248718-27953-2-git-send-email-stefanha@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2584 bytes --]
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 <stefanha@redhat.com>
> ---
> +++ 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 <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-07-10 14:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 12:11 [Qemu-devel] [PATCH v2 0/2] block: add drive_backup HMP command Stefan Hajnoczi
2013-06-26 12:11 ` [Qemu-devel] [PATCH v2 1/2] blockdev: add sync mode to drive-backup QMP command Stefan Hajnoczi
2013-07-10 14:31 ` Eric Blake [this message]
2013-07-10 14:35 ` Kevin Wolf
2013-06-26 12:11 ` [Qemu-devel] [PATCH v2 2/2] block: add drive_backup HMP command Stefan Hajnoczi
2013-07-10 12:17 ` [Qemu-devel] [PATCH v2 0/2] " Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51DD703D.1060602@redhat.com \
--to=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=imain@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).