On 11/21/2013 10:24 PM, 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. > > Signed-off-by: Fam Zheng <f...@redhat.com> > ---
> +++ b/qapi-schema.json > @@ -1844,6 +1844,40 @@ > '*on-target-error': 'BlockdevOnError' } } > > ## > +# @BlockdevBackup > +# > +# @device: the name of the device which should be copied. > +# > +# @target: the name of the backup target device We're not very consistent on whether to end these with a '.'; but that's not the end of the world :) > +# 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: 1.7 1.8 > +## > +{ 'type': 'BlockdevBackup', > + 'data': { 'device': 'str', 'target': 'str', > + 'sync': 'MirrorSyncMode', > + '*speed': 'int', > + '*on-source-error': 'BlockdevOnError', > + '*on-target-error': 'BlockdevOnError' } } > + > +# @blockdev-backup > +# > +# Block device version for drive-backup command. Use existing device as > target > +# of backup. > +# > +# For the arguments, see the documentation of BlockdevBackup. > +# > +# Returns: nothing on success > +# If @device or @target is not a valid block device, DeviceNotFound > +# > +# Since 1.7 1.8 Interface seems okay; I didn't closely review the code leading up to it (but do think your array of blockers, containing a ready-to-return error message, is kind of slick) -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature