From patchwork Wed Mar 9 15:37:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 86123 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0F848B6EF0 for ; Thu, 10 Mar 2011 02:38:51 +1100 (EST) Received: from localhost ([127.0.0.1]:56125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxLTK-0003dM-Uy for incoming@patchwork.ozlabs.org; Wed, 09 Mar 2011 10:38:47 -0500 Received: from [140.186.70.92] (port=33623 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxLSa-0003cq-7Y for qemu-devel@nongnu.org; Wed, 09 Mar 2011 10:38:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxLSY-00063Z-VA for qemu-devel@nongnu.org; Wed, 09 Mar 2011 10:38:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxLSY-00063N-KM for qemu-devel@nongnu.org; Wed, 09 Mar 2011 10:37:58 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p29FbunO017573 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Mar 2011 10:37:56 -0500 Received: from red-feather.redhat.com (ovpn-113-81.phx2.redhat.com [10.3.113.81]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p29FbscQ024048; Wed, 9 Mar 2011 10:37:55 -0500 From: Jes.Sorensen@redhat.com To: qemu-devel@nongnu.org Date: Wed, 9 Mar 2011 16:37:41 +0100 Message-Id: <1299685061-24234-1-git-send-email-Jes.Sorensen@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH] QMP: add snapshot_blkdev_sync command X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jes Sorensen Add QMP bits for snapshot_blkdev_sync command. This is the same as snapshot_blkdev in the human monitor, but added _sync to the name to make it explicit that the command is synchronous and leave space for a future async version. Signed-off-by: Jes Sorensen --- qmp-commands.hx | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index 9d3cc31..e32187e 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -667,6 +667,25 @@ Example: EQMP { + .name = "snapshot_blkdev_sync", + .args_type = "device:B,snapshot_file:s?,format:s?", + .params = "device [new-image-file] [format]", + .help = "initiates a live snapshot\n\t\t\t" + "of device. If a new image file is specified, the\n\t\t\t" + "new image file will become the new root image.\n\t\t\t" + "If format is specified, the snapshot file will\n\t\t\t" + "be created in that format. Otherwise the\n\t\t\t" + "snapshot will be internal! (currently unsupported)", + .user_print = monitor_user_noop, + .mhandler.cmd_new = do_snapshot_blkdev, + }, + +SQMP +Synchronous snapshot of block device, using snapshot file as target +if provided. +EQMP + + { .name = "balloon", .args_type = "value:M", .params = "target",