From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IxOWN-0004w8-IL for qemu-devel@nongnu.org; Wed, 28 Nov 2007 10:08:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IxOWK-0004v4-BZ for qemu-devel@nongnu.org; Wed, 28 Nov 2007 10:08:14 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IxOWK-0004uu-4d for qemu-devel@nongnu.org; Wed, 28 Nov 2007 10:08:12 -0500 Received: from smtp.citrix.com ([66.165.176.89]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IxOWJ-0001K4-V1 for qemu-devel@nongnu.org; Wed, 28 Nov 2007 10:08:12 -0500 Date: Wed, 28 Nov 2007 15:08:07 +0000 From: Samuel Thibault Subject: Re: [Qemu-devel] [PATCH 1/2] Add "directio" parameter to "-drive" Message-ID: <20071128150807.GI4083@implementation.uk.xensource.com> References: <11962585701617@bull.net> <1196258570752@bull.net> <20071128142409.GF4083@implementation.uk.xensource.com> <1196262017.4466.2.camel@frecb07144> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1196262017.4466.2.camel@frecb07144> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: qemu-devel@nongnu.org Laurent Vivier, le Wed 28 Nov 2007 16:00:17 +0100, a écrit : > Le mercredi 28 novembre 2007 à 14:24 +0000, Samuel Thibault a écrit : > > Laurent Vivier, le Wed 28 Nov 2007 15:02:50 +0100, a écrit : > > > + ret = posix_memalign((void**)&buf, 0x200, 512); > > > > For making this more easily portable, maybe it should be a new > > qemu_memalign() function? Also, the alignment may probably be better as > > a global macro, since the alignment requirements depend on the OS. > > I think O_DIRECT is linux specific Yes. > whereas posix_memalign() is part of POSIX specification. Yes, but not so many systems have it. > And the memory alignement should only needed by the implemetation of > O_DIRECT on linux. IIRC it is also required e.g. by the equivalent raw devices of Solaris. It happens that I also need it for the Xen stubdomains support :) Samuel