From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JyjPc-0000A8-9M for qemu-devel@nongnu.org; Wed, 21 May 2008 04:11:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JyjPX-000064-VP for qemu-devel@nongnu.org; Wed, 21 May 2008 04:11:03 -0400 Received: from [199.232.76.173] (port=36920 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JyjPX-00005t-Mt for qemu-devel@nongnu.org; Wed, 21 May 2008 04:10:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:52135) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JyjPW-0005i9-IE for qemu-devel@nongnu.org; Wed, 21 May 2008 04:10:59 -0400 Message-ID: <4833D80E.8070601@suse.de> Date: Wed, 21 May 2008 10:06:38 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT) References: <1211283126.4314.70.camel@frecb07144> <48332AB9.3010707@codemonkey.ws> <20080520223602.GE27853@shareable.org> <200805202352.17807.paul@codesourcery.com> <483373BA.6090108@codemonkey.ws> <4833754C.8090302@codemonkey.ws> In-Reply-To: <4833754C.8090302@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: Blue Swirl , Laurent Vivier , qemu-devel@nongnu.org Anthony Liguori schrieb: > That's a problem with the current patch honestly, we should not rely on > callers to align buffers. bdrv_read()/bdrv_aio_read()/bdrv_pread() all > should be tolerant of unaligned buffers if we're going to support O_DIRECT. I agree, we shouldn't rely on that. And actually we don't. ;-) If (buf & 0x1ff) we're using the emulation with our own aligned buffer. Without this "tolerance" my test image wouldn't even boot up. Kevin