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.