From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrV0c-0002EA-Qe for qemu-devel@nongnu.org; Wed, 18 Jul 2012 10:13:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrV0W-0007N3-UH for qemu-devel@nongnu.org; Wed, 18 Jul 2012 10:13:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrV0W-0007MU-Lh for qemu-devel@nongnu.org; Wed, 18 Jul 2012 10:13:40 -0400 Date: Wed, 18 Jul 2012 15:12:30 +0100 From: "Daniel P. Berrange" Message-ID: <20120718141230.GG2294@redhat.com> References: <4FFBB7FB.3070303@linux.vnet.ibm.com> <4FFBD6F1.90403@redhat.com> <20120713091611.GC15503@stefanha-thinkpad.localdomain> <4FFFEF8E.5080705@redhat.com> <50000793.2020401@redhat.com> <5003CDC6.2040103@linux.vnet.ibm.com> <5003CE8B.20804@redhat.com> <500678F7.1030705@linux.vnet.ibm.com> <20120718135846.GE2294@redhat.com> <5006C1E7.2070407@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5006C1E7.2070407@redhat.com> Subject: Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Anthony Liguori , Stefan Hajnoczi , Michael Tokarev , qemu-devel@nongnu.org, =?utf-8?B?TGx1w61z?= , Blue Swirl , Stefan Weil , Hannes Reinecke , Wenchao Xia 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 :|