From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoF4U-0003gK-9l for qemu-devel@nongnu.org; Mon, 09 Jul 2012 10:36:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoF4K-00080W-FD for qemu-devel@nongnu.org; Mon, 09 Jul 2012 10:36:17 -0400 Received: from verein.lst.de ([213.95.11.211]:45186 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoF4K-0007zt-8g for qemu-devel@nongnu.org; Mon, 09 Jul 2012 10:36:08 -0400 Date: Mon, 9 Jul 2012 16:36:07 +0200 From: Christoph Hellwig Message-ID: <20120709143607.GB5226@lst.de> References: <4FFA9C30.2070201@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FFA9C30.2070201@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: Paolo Bonzini , Anthony Liguori , Stefan Hajnoczi , qemu-devel@nongnu.org On Mon, Jul 09, 2012 at 04:54:08PM +0800, Wenchao Xia wrote: > Hi, Paolo and folks, > qemu have good capabilities to access different virtual disks, I want > to expose its block layer API to let 3rd party program linked in, such > as management stack or block tools, to access images data directly. > > Following is the objects: > (1) API to write/read block device at offset. > (2) Determine the image type,qcow2/qed/raw > (3) Determine which blocks are allocated. > (4) Determine backing file. Sounds like you want a procedural interface for that. At least for (1) I have patches I'll submit soon to add qemu img read/write commands.