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 <pbonz...@redhat.com>
> ---
>  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   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to