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