From: "Daniel P. Berrange" <berrange@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Saggi Mizrahi <smizrahi@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] Added target to build libvdisk
Date: Wed, 24 Aug 2011 13:55:29 +0100 [thread overview]
Message-ID: <20110824125529.GH12120@redhat.com> (raw)
In-Reply-To: <4E54F39D.2040409@codemonkey.ws>
On Wed, Aug 24, 2011 at 07:50:37AM -0500, Anthony Liguori wrote:
> On 08/24/2011 06:32 AM, Saggi Mizrahi wrote:
> >On Tue 23 Aug 2011 07:21:56 PM IDT, Anthony Liguori wrote:
> >>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's not really much better. You'll only end up reinventing the
> block layer API.
>
> The best route is to focus on cleaning up the block layer interface.
> This means converting existing users to use a single interface,
> adding documentation to each interface, writing test cases against
> the block layer API.
>
> Practically speaking, I think we really need to move the block layer
> to use glib primitives too before you can realistically consume the
> code outside of QEMU.
I think it'd be interesting to ask what the intended use cases for
accessing the block layer API outside of QEMU are ?
Personally, for libvirt, I'm only interested in a libblkid like library
that lets us detect what format a disk is, and query some basic metadata
about the file (logical size, vs physical size, backing file paths,
backing file format, whether encryption is present, etc - qemu-img info
equivalent basically).
Apps that actually want to read/write the contents of a virtual disk,
may well be better off just using libguestfs as the API, since they
may well want to actually interpret the data inside the disk, eg to
read specific files out of the filesystem, etc
There's possibly a need for a API to create/clone/convert virtual
disks formats, but that could likely be done without directly
exposing apps to any of the low level BlockDrv APis like pread/pwrite,
instead providing an API at the level of 'qemu-img create' command
args.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
prev parent reply other threads:[~2011-08-24 12:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-22 17:06 [Qemu-devel] [PATCH 1/2] Better support for distros using lib64 dis Saggi Mizrahi
2011-08-22 17:06 ` [Qemu-devel] [PATCH 2/2] Added target to build libvdisk Saggi Mizrahi
2011-08-22 18:50 ` Blue Swirl
2011-08-22 19:29 ` Anthony Liguori
2011-08-23 16:12 ` Daniel P. Berrange
2011-08-23 16:14 ` Anthony Liguori
2011-08-23 16:18 ` Daniel P. Berrange
2011-08-23 16:21 ` Anthony Liguori
2011-08-24 11:32 ` Saggi Mizrahi
2011-08-24 12:50 ` Anthony Liguori
2011-08-24 12:55 ` Daniel P. Berrange [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110824125529.GH12120@redhat.com \
--to=berrange@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=smizrahi@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).