From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH][RFC] Linux AIO support when using O_DIRECT Date: Mon, 23 Mar 2009 19:48:27 +0100 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 Cc: Christoph Hellwig , Avi Kivity , kvm@vger.kernel.org To: qemu-devel@nongnu.org Return-path: Received: from verein.lst.de ([213.95.11.210]:45104 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752774AbZCWStM (ORCPT ); Mon, 23 Mar 2009 14:49:12 -0400 Content-Disposition: inline In-Reply-To: <49C7D096.3000302@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: 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.