[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2 09/12] qmp: add interface blockdev-snapshot-d
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH V2 09/12] qmp: add interface blockdev-snapshot-delete-internal-sync |
Date: |
Sat, 15 Jun 2013 10:55:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 |
On 06/14/2013 12:39 PM, Wenchao Xia wrote:
> Snapshot ID can't be specified in this interface.
Why not? If it is possible to look up by id in isolation, then it
should be possible to delete by id in isolation. Also, if it is
possible to create a snapshot that has an id but no name (and I think
qcow2 allows such snapshots, even if we don't want to expose that corner
case of creation via normal QMP), then it is mandatory to have a way to
delete by id, since there is no name to delete by.
>
> Signed-off-by: Wenchao Xia <address@hidden>
> ---
> blockdev.c | 12 ++++++++++++
> qapi-schema.json | 19 +++++++++++++++++++
> qmp-commands.hx | 30 ++++++++++++++++++++++++++++++
> 3 files changed, 61 insertions(+), 0 deletions(-)
>
> +++ b/qapi-schema.json
> @@ -1712,6 +1712,25 @@
> 'data': { 'device': 'str', '*name': 'str'} }
>
> ##
> +# @blockdev-snapshot-delete-internal-sync
> +#
> +# Synchronously delete an internal snapshot of a block device, when the
> format
> +# of the image used support it.
Should this command be made available via 'transaction'? That is, if I
have a two-disk VM, and use 'transaction' to take a snapshot of both
disks at once, shouldn't I also have a way to delete the snapshots of
both at once, or gracefully fail without data loss if the second one has
problems?
> +#
> +# @device: the name of the device to delete the snapshot from
> +#
> +# @name: the snapshot's name to be deleted
> +#
> +# Returns: nothing on success
> +# If @device is not a valid block device, DeviceNotFound
> +# If snapshot not found, generic error will be returned
> +#
> +# Since 1.6
> +##
> +{ 'command': 'blockdev-snapshot-delete-internal-sync',
> + 'data': { 'device': 'str', 'name': 'str'} }
I'm not convinced that this interface is powerful enough.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH V2 12/12] qemu-iotests: add 055 internal snapshot for block device test case, (continued)
[Qemu-devel] [PATCH V2 05/12] snapshot: add paired functions for internal snapshot id and name, Wenchao Xia, 2013/06/14
[Qemu-devel] [PATCH V2 06/12] snapshot: distinguish id and name in snapshot delete, Wenchao Xia, 2013/06/14
[Qemu-devel] [PATCH V2 10/12] hmp: add interface hmp_snapshot_blkdev_internal, Wenchao Xia, 2013/06/14
[Qemu-devel] [PATCH V2 11/12] hmp: add interface hmp_snapshot_delete_blkdev_internal, Wenchao Xia, 2013/06/14
[Qemu-devel] [PATCH V2 09/12] qmp: add interface blockdev-snapshot-delete-internal-sync, Wenchao Xia, 2013/06/14
- Re: [Qemu-devel] [PATCH V2 09/12] qmp: add interface blockdev-snapshot-delete-internal-sync,
Eric Blake <=
- Re: [Qemu-devel] [PATCH V2 09/12] qmp: add interface blockdev-snapshot-delete-internal-sync, Wenchao Xia, 2013/06/16
- Re: [Qemu-devel] [PATCH V2 09/12] qmp: add interface blockdev-snapshot-delete-internal-sync, Stefan Hajnoczi, 2013/06/18
- Re: [Qemu-devel] [PATCH V2 09/12] qmp: add interface blockdev-snapshot-delete-internal-sync, Wenchao Xia, 2013/06/19
- Re: [Qemu-devel] [PATCH V2 09/12] qmp: add interface blockdev-snapshot-delete-internal-sync, Stefan Hajnoczi, 2013/06/19
- Re: [Qemu-devel] [PATCH V2 09/12] qmp: add interface blockdev-snapshot-delete-internal-sync, Wenchao Xia, 2013/06/19
- Re: [Qemu-devel] [PATCH V2 09/12] qmp: add interface blockdev-snapshot-delete-internal-sync, Stefan Hajnoczi, 2013/06/19
- Re: [Qemu-devel] [PATCH V2 09/12] qmp: add interface blockdev-snapshot-delete-internal-sync, Wenchao Xia, 2013/06/19
[Qemu-devel] [PATCH V2 04/12] snapshot: new function bdrv_snapshot_find_by_id_and_name(), Wenchao Xia, 2013/06/14