From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcNfn-0004T4-3o for qemu-devel@nongnu.org; Wed, 16 Sep 2015 21:07:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcNfj-0007zD-T1 for qemu-devel@nongnu.org; Wed, 16 Sep 2015 21:07:39 -0400 References: <1441878905-5272-1-git-send-email-wency@cn.fujitsu.com> <1441878905-5272-2-git-send-email-wency@cn.fujitsu.com> <87r3m1krdl.fsf@blackfin.pond.sub.org> <55F6EBF5.2090101@redhat.com> <55F776CC.3050601@cn.fujitsu.com> <87fv2g876a.fsf@blackfin.pond.sub.org> <55F7D06D.1080205@cn.fujitsu.com> <87mvwo3phm.fsf@blackfin.pond.sub.org> <55F9054F.1000001@cn.fujitsu.com> <87r3lyzsef.fsf@blackfin.pond.sub.org> <55F92745.6040904@cn.fujitsu.com> <87bnd2y5mn.fsf@blackfin.pond.sub.org> <55F98256.8080304@redhat.com> From: Wen Congyang Message-ID: <55FA122F.8080608@cn.fujitsu.com> Date: Thu, 17 Sep 2015 09:06:55 +0800 MIME-Version: 1.0 In-Reply-To: <55F98256.8080304@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v3 1/5] support nbd driver in blockdev-add List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Markus Armbruster Cc: Kevin Wolf , zhanghailiang , qemu block , Jiang Yunhong , Dong Eddie , qemu devel , "Dr. David Alan Gilbert" , Gonglei , Stefan Hajnoczi , Yang Hongyang 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). >