From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwBh0-0004eu-Ad for qemu-devel@nongnu.org; Wed, 24 Aug 2011 07:32:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwBgy-0002d8-OK for qemu-devel@nongnu.org; Wed, 24 Aug 2011 07:32:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwBgy-0002d0-HG for qemu-devel@nongnu.org; Wed, 24 Aug 2011 07:32:20 -0400 Message-ID: <4E54E140.1060809@redhat.com> Date: Wed, 24 Aug 2011 14:32:16 +0300 From: Saggi Mizrahi MIME-Version: 1.0 References: <1314032798-21423-1-git-send-email-smizrahi@redhat.com> <1314032798-21423-2-git-send-email-smizrahi@redhat.com> <4E52ADFC.5070506@redhat.com> <20110823161239.GO5728@redhat.com> <4E53D1DC.7030609@codemonkey.ws> <20110823161800.GP5728@redhat.com> <4E53D3A4.3070306@codemonkey.ws> In-Reply-To: <4E53D3A4.3070306@codemonkey.ws> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] Added target to build libvdisk List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On Tue 23 Aug 2011 07:21:56 PM IDT, Anthony Liguori wrote: > On 08/23/2011 11:18 AM, Daniel P. Berrange wrote: >> On Tue, Aug 23, 2011 at 11:14:20AM -0500, Anthony Liguori wrote: >>> On 08/23/2011 11:12 AM, Daniel P. Berrange wrote: >>>> $(block-obj-y) pulls in 'aio.o' which is built from aio.c which >>>> is licensed "GPLv2 only". So even those many files are BSD >>>> licenses, the combined work will be GPLv2-only. Unfortunately ending >>>> up with a libqemublock.so which is GPLv2-only is as good as useless >>>> for libs/apps since it is incompatible with both LGPLv2(+) and GPLv3. >>>> >>>> Now in this case aio.c is labelled as Copyright IBM / Anthony, >>>> so IBM could likely resolve this licensing to be more widely >>>> compatible. This could^H^Hwould become a non-trivial task if we >>>> need to look at many files& then also any patches accepted to >>>> those files from 3rd parties over the years :-( >>> >>> If there was a block driver library, I would expect it to be GPL, not >>> LGPL. >> >> This would prevent us from using it in libvirt, unless we wrote a >> helper program which we spawned anytime we wanted to use some >> functionality library :-( > > libvirtd is GPL, no? > > But QEMU is GPL. Libraries derived from QEMU will also be GPL. > > Regards, > > Anthony Liguori > >> >> Regards, >> Daniel OK, I admit it was a pretty naive solution. But I always try to do the simplest solution first. The license issues can be solved later. (Having it as GPL later changing to LGPL if we can). As for the API I can create start a specialized API for the lib that uses the internal API. I can hide BlockDriverState and export it as an fd. int vdisk_open(path, format, flags) size_t vdisk_pread(fd, buf, size, offset) size_t vdisk_pwrite(fd, buff, size, offset) int vdisk_close(fd) int vdisk_get_size(fd) That way no internal structures are exported and we use a minimal set of functions that are very unlikely to change. There is no support for snapshots, metadata etc. But these APIs can be added later. And of-course we can always define the lib as experimental until the API stabilizes.