From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MNoNm-00022p-8c for qemu-devel@nongnu.org; Mon, 06 Jul 2009 09:37:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MNoNg-00022R-So for qemu-devel@nongnu.org; Mon, 06 Jul 2009 09:37:21 -0400 Received: from [199.232.76.173] (port=57114 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNoNg-00022K-Kc for qemu-devel@nongnu.org; Mon, 06 Jul 2009 09:37:16 -0400 Received: from qw-out-1920.google.com ([74.125.92.146]:35581) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MNoNg-0005Ja-A3 for qemu-devel@nongnu.org; Mon, 06 Jul 2009 09:37:16 -0400 Received: by qw-out-1920.google.com with SMTP id 5so1406391qwc.4 for ; Mon, 06 Jul 2009 06:37:15 -0700 (PDT) Message-ID: <4A51FE07.2040307@codemonkey.ws> Date: Mon, 06 Jul 2009 08:37:11 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] RFC: Add new block driver for the VDI format References: <4A4E5AFC.4020206@mail.berlios.de> In-Reply-To: <4A4E5AFC.4020206@mail.berlios.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Kevin Wolf , QEMU Developers , Christoph Hellwig Stefan Weil wrote: > Hello, > > this mail will be followed by two patches which > allow QEMU to create, read and write VDI images. > VDI is the native image format of SUN's VirtualBox emulator. > > The code was written from scratch for QEMU, while earlier patches > sent to Qemu-devel were wrappers for code from VirtualBox. See > http://lists.gnu.org/archive/html/qemu-devel/2008-07/msg00366.html > for those patches. > > Patch 1 adds uuid support to QEMU and can be used independent of > the second patch (look for uuid in vl.c, for example). > > Patch 2 adds the VDI block driver. It only needs uuid support > when a new image is created (without uuid, it will create an image > with zeroed "uuid" values), so this second patch is semi-independent > of the first. > I'd really like to get rid of synchronous IO functions in the block layer. One way to do this is to insist that all new block drivers only implement the AIO functions. I think we should make this decree but I'd like to know if other people think this is unreasonable first. One potential model of block drivers would involve synchronous IO and threads. I'm not a big fan of that model and I don't think it's an easy conversion from today's synchronous IO drivers to that model because the locking and re-entrance needs careful consideration. Since it looks like you're caching the full offset table in memory, and it's a single level, making it asynchronous should be very easy to do. Regards, Anthony Liguori