From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2keh-0004kd-Qa for qemu-devel@nongnu.org; Wed, 29 Feb 2012 09:37:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2keX-0003pg-PM for qemu-devel@nongnu.org; Wed, 29 Feb 2012 09:37:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2keX-0003pR-HP for qemu-devel@nongnu.org; Wed, 29 Feb 2012 09:37:13 -0500 Date: Wed, 29 Feb 2012 11:37:12 -0300 From: Luiz Capitulino Message-ID: <20120229113712.51a0d502@doriath.home> In-Reply-To: <9c58cbefce49000b6716f61c2dd5ef3c7fc7fcbf.1330461199.git.jcody@redhat.com> References: <9c58cbefce49000b6716f61c2dd5ef3c7fc7fcbf.1330461199.git.jcody@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 2/2] QMP: Add qmp command for blockdev-group-snapshot-sync List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org, armbru@redhat.com, pbonzini@redhat.com, eblake@redhat.com On Tue, 28 Feb 2012 15:54:07 -0500 Jeff Cody wrote: > This adds the QMP command for blockdev-group-snapshot-sync. It > takes an array in as the input, for the argument devlist. The > array consists of the following elements: > > + device: device to snapshot. e.g. "ide-hd0", "virtio0" > + snapshot-file: path & file for the snapshot image. e.g. "/tmp/file.img" > + format: snapshot format. e.g., "qcow2". Optional > > There is no HMP equivalent for the command. > > Signed-off-by: Jeff Cody Could have been squashed with the previous patch, but of course that you don't have to respin because of that. > --- > qmp-commands.hx | 39 +++++++++++++++++++++++++++++++++++++++ > 1 files changed, 39 insertions(+), 0 deletions(-) > > diff --git a/qmp-commands.hx b/qmp-commands.hx > index b5e2ab8..15d35c1 100644 > --- a/qmp-commands.hx > +++ b/qmp-commands.hx > @@ -665,6 +665,45 @@ EQMP > .args_type = "device:B", > .mhandler.cmd_new = qmp_marshal_input_block_job_cancel, > }, > + { > + .name = "blockdev-group-snapshot-sync", > + .args_type = "devlist:O", > + .params = "device:B,snapshot-file:s,format:s?", > + .mhandler.cmd_new = qmp_marshal_input_blockdev_group_snapshot_sync, > + }, > + > +SQMP > +blockdev-group-snapshot-sync > +---------------------- > + > +Synchronous snapshot of one or more block devices. A list array input > +is accepted, that contains the device and snapshot file information for > +each device in group. The default format, if not specified, is qcow2. > + > +If there is any failure creating or opening a new snapshot, all snapshots > +for the group are abandoned, and the original disks pre-snapshot attempt > +are used. > + > + > +Arguments: > + > +devlist array: > + - "device": device name to snapshot (json-string) > + - "snapshot-file": name of new image file (json-string) > + - "format": format of new image (json-string, optional) > + > +Example: > + > +-> { "execute": "blockdev-group-snapshot-sync", "arguments": > + { "devlist": [{ "device": "ide-hd0", > + "snapshot-file": "/some/place/my-image", > + "format": "qcow2" }, > + { "device": "ide-hd1", > + "snapshot-file": "/some/place/my-image2", > + "format": "qcow2" }] } } > +<- { "return": {} } > + > +EQMP > > { > .name = "blockdev-snapshot-sync",