[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block

From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API
Date: Wed, 18 Jul 2012 15:12:30 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jul 18, 2012 at 04:02:15PM +0200, Paolo Bonzini wrote:
> Il 18/07/2012 15:58, Daniel P. Berrange ha scritto:
> > How is error reporting dealt with
> These APIs just return errno values.

Which has led to somewhat unhelpful error reporting in the past. If we're
designing a library API it'd be nice to improve on this.

> > , and what is the intent around
> > thread safety of the APIs ?  I'd like to see a fully thread safe
> > API - multiple threads can use the same 'BlockDriverState *'
> > concurrently, and thread-local error reporting.
> This is a bit difficult to provide, since the QEMU block layer itself is
> not thread-safe.

Yep, I'd expect that this is something we'd need to fix when turning the
code into a library.  NB, I don't mean to say QEMU should protect against
an app doing stupid things like letting 2 threads write to the same area
of the file at once. That's upto the application. I simply mean that the
BlockDriverState shouldn't corrupt itself if 2 separate APIs are called
concurrently on the same instance.

> Another missing feature is passwords.

Oh yes.

|: 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 :|

reply via email to

[Prev in Thread] Current Thread [Next in Thread]