From patchwork Wed Jun 25 19:43:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 364132 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C83214009E for ; Thu, 26 Jun 2014 05:44:12 +1000 (EST) Received: from localhost ([::1]:40706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzt74-0001G8-Hw for incoming@patchwork.ozlabs.org; Wed, 25 Jun 2014 15:44:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzt6Y-0000r4-56 for qemu-devel@nongnu.org; Wed, 25 Jun 2014 15:43:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wzt6S-000244-1u for qemu-devel@nongnu.org; Wed, 25 Jun 2014 15:43:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzt6R-00023n-Qu for qemu-devel@nongnu.org; Wed, 25 Jun 2014 15:43:32 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5PJhSHr008081 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Jun 2014 15:43:29 -0400 Received: from localhost ([10.3.112.8]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5PJhQk1003339 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Wed, 25 Jun 2014 15:43:27 -0400 From: Jeff Cody To: qemu-devel@nongnu.org Date: Wed, 25 Jun 2014 15:43:15 -0400 Message-Id: <54b12f6861076ec0803291956de38cc5393bfd5f.1403723862.git.jcody@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, benoit.canet@irqsave.net, pkrempa@redhat.com, famz@redhat.com, stefanha@redhat.com Subject: [Qemu-devel] [PATCH v7 for 2.1 4/4] block: Add QMP documentation for block-stream X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The QMP command 'block-stream' was missing QMP documentation. Add that documentation. Reviewed-by: Eric Blake Reviewed-by: Benoit Canet Signed-off-by: Jeff Cody --- qmp-commands.hx | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/qmp-commands.hx b/qmp-commands.hx index bf82603..f25b864 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -983,6 +983,64 @@ EQMP .mhandler.cmd_new = qmp_marshal_input_block_stream, }, +SQMP +block-stream +------------ + +Copy data from a backing file into a block device. + +The block streaming operation is performed in the background until the entire +backing file has been copied. This command returns immediately once streaming +has started. The status of ongoing block streaming operations can be checked +with query-block-jobs. The operation can be stopped before it has completed +using the block-job-cancel command. + +If a base file is specified then sectors are not copied from that base file and +its backing chain. When streaming completes the image file will have the base +file as its backing file. This can be used to stream a subset of the backing +file chain instead of flattening the entire image. + +On successful completion the image file is updated to drop the backing file +and the BLOCK_JOB_COMPLETED event is emitted. + +- "device": The device name. + (json-string) + +For base, either 'base' or 'base-node-name' may be set but not both. If +neither is specified, the entire chain will be streamed into the active image, +and the chain will consist of a single image (the current active layer) with +no backing file. + +- "base": The common backing file name. + (json-string, optional) + +- "base-node-name": The block driver state node name of the common backing file. + (json-string, optional) (Since 2.1) + +- "backing-file": The backing file string to write into the active layer. + This filename is not validated. + + If a pathname string is such that it cannot be resolved by + QEMU, that means that subsequent QMP or HMP commands must + use node-names for the image in question, as filename + lookup methods will fail. + + If not specified, QEMU will automatically determine the + backing file string to use, or error out if there is no + obvious choice. Care should be taken when specifying the + string, to specify a valid filename or protocol. + (json-string, optional) + (Since 2.1) + +- "speed": The maximum speed, in bytes per second. + (json-int, optional) + +- "on-error": The action to take on an error (default report). + 'stop' and 'enospc' can only be used if the block device + supports io-status (see BlockInfo). + (json-enum, optional) (Since 1.3) +EQMP + { .name = "block-commit", .args_type = "device:B,base:s?,base-node-name:s?,top:s?,top-node-name:s?,backing-file:s?,speed:o?",