From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoSea-0008CD-SX for qemu-devel@nongnu.org; Tue, 10 Jul 2012 01:06:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoSeZ-0003NQ-3d for qemu-devel@nongnu.org; Tue, 10 Jul 2012 01:06:28 -0400 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:50327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoSeY-0003Ly-GV for qemu-devel@nongnu.org; Tue, 10 Jul 2012 01:06:27 -0400 Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 Jul 2012 05:03:02 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6A56H9t8388904 for ; Tue, 10 Jul 2012 15:06:17 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6A56H9f023081 for ; Tue, 10 Jul 2012 15:06:17 +1000 Message-ID: <4FFBB7FB.3070303@linux.vnet.ibm.com> Date: Tue, 10 Jul 2012 13:04:59 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <4FFA9C30.2070201@linux.vnet.ibm.com> <4FFAA0C3.3080703@redhat.com> In-Reply-To: <4FFAA0C3.3080703@redhat.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Anthony Liguori , Stefan Hajnoczi , qemu-devel@nongnu.org ÓÚ 2012-7-9 17:13, Paolo Bonzini дµÀ: > Il 09/07/2012 10:54, Wenchao Xia ha scritto: >> Following is my implementing plan draft: >> 1 introduce libqblock.so in sub directory in qemu. >> 2 write a nbd client in libqblock, similar to qemu nbd client. Then >> use it to talk with nbd server, by default is qemu-nbd, to get access >> to images. In this way, libqblock.so could be friendly LGPL licensed. > > Did you actually assess the license situation of the block layer? > block.c and large parts of block/* are under a BSD license, for example. > If the library only has to support raw files, it might do so using > synchronous I/O only. This would remove a large body of GPL-licensed code. > If the library was built as nbd-client communicating with nbd-server, which then employ the BSO licensed code, could the library ignore the server side's license problem? The reason using nbd-client approach are: work around qemu block layer license issue and easy to implement, if other tool found this labrary useful then considering about directly employ the qemu block code. >> 3 still not got a good way to get additional info in (2)(3)(4), >> currently in my head is patch qemu-nbd to add an additional nbd command, >> "image-info", in which returns related info. > > On the Linux kernel mailing list I would have no qualms labeling such > command as "crap". However, since the social standards on qemu-devel > are a bit higher, I'll ask instead: what information would the command > provide beyond the size? > The API need to report the image format it is using, such as "qcow2". And also API should report if a block at offset have been allocated or it is a hole. > Paolo > -- Best Regards Wenchao Xia