From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MU0gu-0008J3-Do for qemu-devel@nongnu.org; Thu, 23 Jul 2009 11:58:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MU0gp-0008A8-Jm for qemu-devel@nongnu.org; Thu, 23 Jul 2009 11:58:43 -0400 Received: from [199.232.76.173] (port=43305 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MU0gp-00089x-HK for qemu-devel@nongnu.org; Thu, 23 Jul 2009 11:58:39 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:60005) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MU0go-0003ak-SY for qemu-devel@nongnu.org; Thu, 23 Jul 2009 11:58:39 -0400 Received: from localhost ([127.0.0.1] ident=stefan) by flocke.weilnetz.de with esmtp (Exim 4.69) (envelope-from ) id 1MU0gm-0001ZF-PY for qemu-devel@nongnu.org; Thu, 23 Jul 2009 17:58:36 +0200 Message-ID: <4A6888AC.3050509@mail.berlios.de> Date: Thu, 23 Jul 2009 17:58:36 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: [Qemu-devel] [PATCH] RFC: Add new block driver for the VDI format (aio version) References: <4A4E5AFC.4020206@mail.berlios.de> In-Reply-To: <4A4E5AFC.4020206@mail.berlios.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers Stefan Weil schrieb: > 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. > > Please test, comment and add both patches to QEMU master > (if there are no objections). > > Regards > > Stefan Weil The new version of the VDI block driver adds these changes: * Fix allocation of new blocks. The old code did not update the image header, so after a new program start, new allocations had overwritten old ones. This is something still untested by qemu-iotests. * Fix endianess issues. I'm sorry I could not test it up to now, but it should work nevertheless :-) * Support asynchronous i/o. The synchronous code is still included as a compile time option, but the default is asynchronous, and it works. I'm very sure the aio code can be improved, and some parts are even unnecessary (at least I think so), so if you are a block driver expert: please review the code and send comments. * Support checking of VDI images. These consistency checks were very helpful during driver development! * Support static images. Static images use pre-allocated blocks while dynamic images (default) allocate blocks on demand. Here is an overview of the new patches: * Patch 1 adds UUID support to QEMU. This update of the old patch was needed because of changes in QEMU's configure / Makefiles. Please commit it to QEMU master, so I don't have to fix and resend it when there are additional changes in these files. * Patch 2 is the new VDI block driver. Reviews and suggestions are welcome. * Patch 3 fixes qemu-io-tests to support the new VDI block driver (needed because of new option for static images). The latest code is also available from http://repo.or.cz/w/qemu/ar7.git Regards Stefan Weil