qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	imain@redhat.com, Fam Zheng <famz@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/2] blockdev: add sync mode to drive-backup QMP command
Date: Wed, 10 Jul 2013 16:35:24 +0200	[thread overview]
Message-ID: <20130710143524.GS3898@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <51DD703D.1060602@redhat.com>

Am 10.07.2013 um 16:31 hat Eric Blake geschrieben:
> 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.

Luiz said he's going to send his pull request today; then I'll rebase
my tree and fix this conflict tomorrow. (It's trivial enough that we
don't have to go through another version.)

> If you do rebase, feel free to add:
> Reviewed-by: Eric Blake <eblake@redhat.com>

Thanks, I've added it.

Kevin

  reply	other threads:[~2013-07-10 14:36 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
2013-07-10 14:35     ` Kevin Wolf [this message]
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=20130710143524.GS3898@dhcp-200-207.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=imain@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).