qemu-devel
[Top][All Lists]
Advanced

[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: Kevin Wolf
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
User-agent: Mutt/1.5.21 (2010-09-15)

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 <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.

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 <address@hidden>

Thanks, I've added it.

Kevin



reply via email to

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