From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiN3Z-0007wZ-MJ for qemu-devel@nongnu.org; Wed, 15 Apr 2015 09:08:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiN3S-0007ax-So for qemu-devel@nongnu.org; Wed, 15 Apr 2015 09:08:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiN3S-0007aR-JE for qemu-devel@nongnu.org; Wed, 15 Apr 2015 09:08:34 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3FD8XqI027667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 15 Apr 2015 09:08:33 -0400 Message-ID: <552E62CE.6080308@redhat.com> Date: Wed, 15 Apr 2015 15:08:30 +0200 From: Max Reitz MIME-Version: 1.0 References: <1429094622-26218-1-git-send-email-stefanha@redhat.com> In-Reply-To: <1429094622-26218-1-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block: document block-stream in qmp-commands.hx List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf On 15.04.2015 12:43, Stefan Hajnoczi wrote: > The 'block-stream' QMP command is documented in block-core.json but not > qmp-commands.hx. Add a summary of the command to qmp-commands.hx > (similar to the documentation for 'block-commit'). > > Reported-by: Kashyap Chamarthy > Signed-off-by: Stefan Hajnoczi > --- > qmp-commands.hx | 37 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 37 insertions(+) > > diff --git a/qmp-commands.hx b/qmp-commands.hx > index 3a42ad0..7a745ed 100644 > --- a/qmp-commands.hx > +++ b/qmp-commands.hx > @@ -1008,6 +1008,43 @@ EQMP > .mhandler.cmd_new = qmp_marshal_input_block_stream, > }, > > +SQMP > +block-stream > +------------ > + > +Copy data from a backing file into a block device. It looks like you stopped just copy-pasting the information from block-core.json here... > + > +Arguments: > + > +- "device": The device's ID, must be unique (json-string) ...instead sometimes copying it from block-commit... > +- "base": The file name of the backing image above which copying starts > + (json-string, optional) ...or creating new descriptions... > +- "backing-file": The backing file string to write into the active layer. This > + filename is not validated. ...and then you are continuing copying the block-core.json entry. Is there a reason why you didn't just take all of the block-core.json comment and put it here? (just curious) Reviewed-by: Max Reitz > + > + 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. > + (json-string, optional) (Since 2.1) > + > +Example: > + > +-> { "execute": "block-stream", "arguments": { "device": "virtio0", > + "base": "/tmp/master.qcow2" } } > +<- { "return": {} } > + > +EQMP > + > { > .name = "block-commit", > .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",