From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btyUh-0003E8-Vg for qemu-devel@nongnu.org; Tue, 11 Oct 2016 10:57:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btyUc-0004GC-Ee for qemu-devel@nongnu.org; Tue, 11 Oct 2016 10:57:27 -0400 Date: Tue, 11 Oct 2016 16:57:12 +0200 From: Kevin Wolf Message-ID: <20161011145712.GF6334@noname.redhat.com> References: <1c8e6e73084e968514b6522576cfacd1bf69609e.1475757437.git.berto@igalia.com> <48b78d7e-3f52-79d3-27a1-19047100161b@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v10 09/16] block: Add QMP support for streaming to an intermediate layer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: Eric Blake , qemu-devel@nongnu.org, qemu-block@nongnu.org, Markus Armbruster , Max Reitz , Stefan Hajnoczi Am 11.10.2016 um 16:30 hat Alberto Garcia geschrieben: > On Mon 10 Oct 2016 09:09:25 PM CEST, Eric Blake wrote: > >> # @job-id: #optional identifier for the newly-created block job. If > >> # omitted, the device name will be used. (Since 2.7) > >> # > >> -# @device: the device name or node-name of a root node > >> +# @device: the device or node name of the top image > >> # > >> # @base: #optional the common backing file name > >> # > >> -# @backing-file: #optional The backing file string to write into the active > >> -# layer. This filename is not validated. > >> +# @backing-file: #optional The backing file string to write into the top > >> +# image. This filename is not validated. > > > > No change to the actual introspection. What's the easiest way for > > libvirt to learn if the new style command will work, short of actually > > trying it to see if it succeeds or fails? (That may be sufficient, > > but the error message quality can often be improved in libvirt if it > > is known up front if qemu is new enough rather than taking the 'try > > and see' approach and getting stuck with qemu's error message) > > I don't think there's any straightforward way. Some ideas: > > 1) Try to start a block-stream job that does nothing. When base == > backing_bs(device) that's a no-op, but it fails if device is not the > root node and intermediate block streaming is not supported. > > 2) We could add an extra parameter. For example 'base-node', which would > be the same as 'base' but would take a node name instead of a file name. Oh, we still have those filename-based parameters? :-/ Should we introduce a new, clean blockdev-stream command that fixes this and matches the common name pattern? Of course, block-stream vs. blockdev-stream could be a bit confusing, too... > 3) QEMU could advertise that feature to the client. This is probably > simpler than trying to figure it out from the API. I guess that's the > idea of 'qmp_capabilities'? I think that was the idea, though it was never used. If we had used it, I'm not sure how long the capabilities list would be today. :-) Kevin