From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LlpCm-0004TX-EG for qemu-devel@nongnu.org; Mon, 23 Mar 2009 14:49:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LlpCh-0004SP-Sc for qemu-devel@nongnu.org; Mon, 23 Mar 2009 14:48:59 -0400 Received: from [199.232.76.173] (port=58696 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LlpCh-0004SJ-Ee for qemu-devel@nongnu.org; Mon, 23 Mar 2009 14:48:55 -0400 Received: from verein.lst.de ([213.95.11.210]:45097) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1LlpCg-0002hL-VR for qemu-devel@nongnu.org; Mon, 23 Mar 2009 14:48:55 -0400 Date: Mon, 23 Mar 2009 19:48:27 +0100 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH][RFC] Linux AIO support when using O_DIRECT Message-ID: <20090323184827.GA14826@lst.de> References: <1237823124-6417-1-git-send-email-aliguori@us.ibm.com> <49C7B620.8030203@redhat.com> <49C7C392.3030001@codemonkey.ws> <20090323172928.GB29449@infradead.org> <49C7D096.3000302@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49C7D096.3000302@codemonkey.ws> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Christoph Hellwig , Avi Kivity , kvm@vger.kernel.org On Mon, Mar 23, 2009 at 01:10:30PM -0500, Anthony Liguori wrote: > I really dislike having so many APIs. I'd rather have an aio API that > took byte accesses or have pread/pwrite always be emulated with a full > sector read/write I had patches to change the aio API to byte based access, and get rid of the read/write methods to only have the byte based pread/pwrite APIs, but thay got obsoleted by Avi's patch to kill the pread/pwrite ops. We could put in byte-based AIO without byte-based read/write, though. In my patches I put a flag into BlockDriverState whether we allow byte-based access to this instance or otherwise emulated it in the block layer. We still need this as many of the image formats can't deal with byte-granularity access without read-modify-write cycles, and I think we're better off having one read-modify-write handler in the block handler than one per image format that needs it.