From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JrZt5-0005v1-Np for qemu-devel@nongnu.org; Thu, 01 May 2008 10:35:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JrZt4-0005ug-7r for qemu-devel@nongnu.org; Thu, 01 May 2008 10:35:55 -0400 Received: from [199.232.76.173] (port=46636 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JrZt4-0005ud-4b for qemu-devel@nongnu.org; Thu, 01 May 2008 10:35:54 -0400 Received: from ik-out-1112.google.com ([66.249.90.181]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JrZt3-0005Xm-RQ for qemu-devel@nongnu.org; Thu, 01 May 2008 10:35:54 -0400 Received: by ik-out-1112.google.com with SMTP id c21so102810ika.2 for ; Thu, 01 May 2008 07:35:51 -0700 (PDT) Message-ID: Date: Thu, 1 May 2008 17:35:51 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH] Align file accesses with cache=off (O_DIRECT) In-Reply-To: <200804302305.42741@kevin-wolf.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4807514B.9040607@suse.de> <48186134.7070303@suse.de> <200804302305.42741@kevin-wolf.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Laurent Vivier , qemu-devel@nongnu.org On 5/1/08, Kevin Wolf wrote: > Am Mittwoch, 30. April 2008 16:30:27 schrieb Blue Swirl: > > > Maybe the alignment could be handled like AIO and synchronous IO > > emulation layers are added in bdrv_register, but at open stage? > > > You mean to preserve the original pread if the file is opened without O_DIRECT > and replace it by the emulation function only if O_DIRECT is really used? Right. > Certainly possible in some way (having a function pointer in BDRVRawState), > but this won't save us anything. > > But maybe I'm just missing your point. How exactly do you want to handle > things and what does it improve? Maybe it's slightly faster that way and it would be closer to how other block emulations are handled. It's just an idea.