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: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v17 10/14] qmp: Add command 'blockdev-backup'
Date: Mon, 07 Apr 2014 15:07:31 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

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

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