[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 23/36] qmp: add drive-mirror command
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH 23/36] qmp: add drive-mirror command |
Date: |
Wed, 11 Jul 2012 18:23:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
Il 15/06/2012 22:12, Eric Blake ha scritto:
> On 06/15/2012 09:05 AM, Paolo Bonzini wrote:
>> > This adds the monitor commands that start the mirroring job.
>> >
>> > Signed-off-by: Paolo Bonzini <address@hidden>
>> > ---
>> > blockdev.c | 120
>> > ++++++++++++++++++++++++++++++++++++++++++++++++++++--
>> > hmp-commands.hx | 21 ++++++++++
>> > hmp.c | 28 +++++++++++++
>> > hmp.h | 1 +
>> > qapi-schema.json | 33 +++++++++++++++
>> > qmp-commands.hx | 41 +++++++++++++++++++
>> > trace-events | 2 +-
>> > 7 files changed, 242 insertions(+), 4 deletions(-)
>> >
>> > ##
>> > +# @drive-mirror
>> > +#
>> > +# Start mirroring a block device's writes to a new destination.
>> > +#
>> > +# @device: the name of the device whose writes should be mirrored.
>> > +#
>> > +# @target: the target of the new image. If the file exists, or if it
>> > +# is a device, the existing file/device will be used as the new
>> > +# destination. If it does not exist, a new file will be created.
>> > +#
>> > +# @format: #optional the format of the new destination, default is the
>> > +# format of the source
>> > +#
>> > +# @mode: #optional whether and how QEMU should create a new image,
>> > default is
>> > +# 'absolute-paths'.
> Indentation.
>
>> > +#
>> > +# @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).
> Document @peed:.
>
>> > +#
>> > +# Returns: nothing on success
>> > +# If @device is not a valid block device, DeviceNotFound
>> > +# If @target can't be opened, OpenFileFailed
>> > +# If @format is invalid, InvalidBlockFormat
>> > +#
>> > +# Since 1.1
> 1.2
>
>> > +##
>> > +{ 'command': 'drive-mirror',
>> > + 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
>> > + 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
>> > + '*speed': 'int' } }
>> > +
>> > +##
>> > # @migrate_cancel
>> > #
>> > # Cancel the current executing migration process.
>> > diff --git a/qmp-commands.hx b/qmp-commands.hx
>> > index e2d77b6..cccea2f 100644
>> > --- a/qmp-commands.hx
>> > +++ b/qmp-commands.hx
>> > @@ -832,6 +832,47 @@ Example:
>> > EQMP
>> >
>> > {
>> > + .name = "drive-mirror",
>> > + .args_type = "sync:s,device:B,target:s,sync:s?,format:s?",
> sync: twice? and no speed: or mode:?
>
>
>> > +SQMP
>> > +drive-mirror
>> > +------------
>> > +
>> > +Start mirroring a block device's writes to a new destination. target
>> > +specifies the target of the new image. If the file exists, or if it is
>> > +a device, it will be used as the new destination for writes. If does not
>> > +exist, a new file will be created. format specifies the format of the
>> > +mirror image, default is to probe if mode='existing', else qcow2.
> default is qcow2? Earlier in this patch you said the same format as the
> source.
Indeed, thanks for pointing out all the inconsistencies.
Paolo
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [RFC PATCH 23/36] qmp: add drive-mirror command,
Paolo Bonzini <=