On 09/16/2015 10:53 PM, Eric Blake wrote: > On 09/16/2015 05:18 AM, Markus Armbruster wrote: > >>>>>>>> Perhaps it could be as simple as >>>>>>>> >>>>>>>> { 'struct': 'BlockdevOptionsNBD', >>>>>>>> 'data': { 'addr: 'SocketAddress', 'export': 'str' } } >>>>>>> >>>>>>> The problem is that: NBD doesn't use the fd. >>>>>> >>>>>> Is that fundamental, or just a matter of implementation? >>>> >>>> Question still open. >> >> Question still open. > > Dan's patches didn't address it... > >> Long term, I'd like to see us get rid of the conversions between >> QAPI-generated types and QDict / QemuOpts. >> >> Short term, you need to co-evolve the QDict-based code such as >> nbd_config() with the QAPI interfaces. > > ...but DO affect the short-term, by starting the conversion over to > using the QAPI type more fully: > https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg04383.html
The problem still exists with this patch, because we pass "addr.data.host" to nbd_open(). Thanks Wen Congyang > >> >> Keeping the QAPI interface clean is more important than minimizing the >> implementation work, because we're free to mess with the implementation, >> but releasing a QAPI interface makes it ABI, so we better get it right. > > Especially once the QAPI interface is actually used by a QMP command > (there are places where we are using qapi internally for ease in command > line handling, but not exposing the structures through QMP yet). >