qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 6/7] qmp: add command 'blockdev-backup'


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4 6/7] qmp: add command 'blockdev-backup'
Date: Fri, 22 Nov 2013 13:46:08 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

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

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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