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