qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v17 10/14] qmp: Add command 'blockdev-backup'


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v17 10/14] qmp: Add command 'blockdev-backup'
Date: Tue, 8 Apr 2014 15:00:53 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, 04/07 15:07, Eric Blake wrote:
> On 03/10/2014 01:26 AM, Fam Zheng wrote:
> > Similar to drive-backup, but this command uses a device id as target
> > instead of creating/opening an image file.
> > 
> > Also add blocker on target bs, since the target is also a named device
> > now.
> > 
> > Add check and report error for bs == target which became possible but is
> > an illegal case with introduction of blockdev-backup.
> > 
> > Signed-off-by: Fam Zheng <address@hidden>
> > ---
> >  block/backup.c   | 26 ++++++++++++++++++++++++++
> >  blockdev.c       | 47 +++++++++++++++++++++++++++++++++++++++++++++++
> >  qapi-schema.json | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
> >  qmp-commands.hx  | 44 ++++++++++++++++++++++++++++++++++++++++++++
> >  4 files changed, 166 insertions(+)
> 
> Reviewing just QAPI portion:
> 
> 
> > +++ b/qapi-schema.json
> > @@ -1919,6 +1919,40 @@
> >              '*on-target-error': 'BlockdevOnError' } }
> >  
> >  ##
> > +# @BlockdevBackup
> > +#
> > +# @device: the name of the device which should be copied.
> > +#
> > +# @target: the name of the backup target device.
> > +#
> > +# @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).
> > +#
> > +# @speed: #optional the maximum speed, in bytes per second.
> > +#
> > +# @on-source-error: #optional the action to take on an error on the source,
> > +#                   default 'report'.  'stop' and 'enospc' can only be used
> > +#                   if the block device supports io-status (see BlockInfo).
> > +#
> > +# @on-target-error: #optional the action to take on an error on the target,
> > +#                   default 'report' (no limitations, since this applies to
> > +#                   a different block device than @device).
> > +#
> > +# Note that @on-source-error and @on-target-error only affect background 
> > I/O.
> > +# If an error occurs during a guest write request, the device's 
> > rerror/werror
> > +# actions will be used.
> > +#
> > +# Since: 2.0
> 
> 2.1 now
> 
> > +##
> > +{ 'type': 'BlockdevBackup',
> > +  'data': { 'device': 'str', 'target': 'str',
> > +            'sync': 'MirrorSyncMode',
> > +            '*speed': 'int',
> > +            '*on-source-error': 'BlockdevOnError',
> > +            '*on-target-error': 'BlockdevOnError' } }
> > +
> 
> Looks reasonable
> 
> 
> > +#          If @device or @target is not a valid block device, 
> > DeviceNotFound.
> > +#
> > +# Since 2.0
> > +##
> > +{ 'command': 'blockdev-backup', 'data': 'BlockdevBackup' }
> 
> Another case of 2.1

Yes, thanks!

Fam



reply via email to

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