On 02/29/2012 06:37 AM, Paolo Bonzini wrote: > Add a new transaction type, "mirror". It stacks a new blkmirror > file (instead of a snapshot) on top of the existing image. > > It is possible to combine snapshot and mirror as two actions in the > same transaction. Because of atomicity ensured by blockdev-transaction, > this will create a snapshot *and* ensure that _all_ operations that are > sent to it are also mirrored. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > blockdev.c | 47 +++++++++++++++++++++++++++++++++++------------ > qapi-schema.json | 19 ++++++++++++++++++- > qmp-commands.hx | 12 +++++++++++- > 3 files changed, 64 insertions(+), 14 deletions(-) >
> @@ -721,6 +725,12 @@ actions array: > - "format": format of new image (json-string, optional) > - "reuse": whether QEMU should look for an existing image file > (json-bool, optional, default false) > + When "type" is "mirror": > + - "device": device name to snapshot (json-string) > + - "target": name of destination image file (json-string) > + - "format": format of new image (json-string, optional) > + - "reuse": whether QEMU should look for an existing image file > + (json-bool, optional, default false) This falls out very nicely. Do we want to also add a 'reopen' operation to the union, for the remaining action needed by oVirt live migration? -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature