From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVjeB-0001C4-5N for qemu-devel@nongnu.org; Wed, 11 Mar 2015 12:38:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVje5-0004IE-BE for qemu-devel@nongnu.org; Wed, 11 Mar 2015 12:38:15 -0400 Received: from smtp3.mundo-r.com ([212.51.32.191]:34002 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVje5-0004HW-4E for qemu-devel@nongnu.org; Wed, 11 Mar 2015 12:38:09 -0400 Date: Wed, 11 Mar 2015 17:38:06 +0100 From: Alberto Garcia Message-ID: <20150311163806.GA5883@igalia.com> References: <49b845c4a362ffd64ec78bbe0b165cd7addd2a4b.1424439295.git.berto@igalia.com> <20150305140958.GE5427@noname.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150305140958.GE5427@noname.redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/3] block: Add QMP support for streaming to an intermediate layer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Jeff Cody , qemu-devel@nongnu.org, Stefan Hajnoczi On Thu, Mar 05, 2015 at 03:09:58PM +0100, Kevin Wolf wrote: > > { 'command': 'block-stream', > > - 'data': { 'device': 'str', '*base': 'str', '*backing-file': 'str', > > - '*speed': 'int', '*on-error': 'BlockdevOnError' } } > > + 'data': { 'device': 'str', '*base': 'str', '*top': 'str', > > + '*backing-file': 'str', '*speed': 'int', > > + '*on-error': 'BlockdevOnError' } } > > There is no point in specifying some root node as 'device' that > isn't actually involved in the operation; worse, it isn't even > possible in the general case because 'top' could have multiple > users/parents. > > A better interface would probably be to allow node names for > 'device' and leave everything else as it is. Ok, I changed the code and it does make the implementation simpler. One issue that I'm finding is that when we move the block-stream job to an intermediate node, where the device name is empty, we get messages like "Device '' is busy". I can use node names instead, but they are also not guaranteed to exist. I heard there was a plan to auto-generate names, and searching the archives I found this patch by Jeff Cody: http://lists.gnu.org/archive/html/qemu-devel/2014-06/msg04057.html But it seems that it was never merged? If we are going to have a scenario where a parameter can mean either a device or a node name, we need a clear way to identify that node. Berto