[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 5/8] qmp: convert blockdev-snapshot-sync to a
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 5/8] qmp: convert blockdev-snapshot-sync to a wrapper around transactions |
Date: |
Mon, 05 Mar 2012 11:55:48 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 |
On 03/05/2012 10:33 AM, Paolo Bonzini wrote:
> Simplify the blockdev-snapshot-sync code and gain failsafe operation
> by turning it into a wrapper around the new transaction command. A new
> option is also added matching "mode".
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> blockdev.c | 81 ++++++++++++-----------------------------------------
> hmp-commands.hx | 9 ++++--
> hmp.c | 6 +++-
> qapi-schema.json | 15 +++++----
> qmp-commands.hx | 2 +
> 5 files changed, 40 insertions(+), 73 deletions(-)
>
> +++ b/qapi-schema.json
> @@ -1143,6 +1143,9 @@
> # @snapshot-file: the target of the new image. A new file will be created.
> #
> # @format: #optional the format of the snapshot image, default is 'qcow2'.
> +#
> +# @mode: #optional whether and how QEMU should create a new image, default is
> +# 'absolute-paths'.
> ##
> { 'type': 'BlockdevSnapshot',
> 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
> @@ -1199,21 +1202,19 @@
> #
> # @format: #optional the format of the snapshot image, default is 'qcow2'.
> #
> +# @mode: #optional whether and how QEMU should create a new image, default is
> +# 'absolute-paths'.
Right now, libvirt has an API virDomainSnapshotCreateXML with a flag
VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT, which should map to this new mode
operand. Am I guaranteed that if I pass a 'mode' argument of 'existing'
to an older qemu that lacked mode, I will get a sane error? If so, then
this rewrite looks fine from libvirt's point of view.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH v3 3/8] rename blockdev-group-snapshot-sync, Paolo Bonzini, 2012/03/05
[Qemu-devel] [PATCH v3 5/8] qmp: convert blockdev-snapshot-sync to a wrapper around transactions, Paolo Bonzini, 2012/03/05
- Re: [Qemu-devel] [PATCH v3 5/8] qmp: convert blockdev-snapshot-sync to a wrapper around transactions,
Eric Blake <=
[Qemu-devel] [PATCH v3 1/8] fix format name for backing file, Paolo Bonzini, 2012/03/05
[Qemu-devel] [PATCH v3 6/8] Add blkmirror block driver, Paolo Bonzini, 2012/03/05
[Qemu-devel] [PATCH v3 7/8] add mirroring to transaction, Paolo Bonzini, 2012/03/05
[Qemu-devel] [PATCH v3 4/8] add mode field to blockdev-snapshot-sync transaction item, Paolo Bonzini, 2012/03/05
[Qemu-devel] [PATCH v3 8/8] add drive-mirror command and HMP equivalent, Paolo Bonzini, 2012/03/05