From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N1xNl-0007SR-MZ for qemu-devel@nongnu.org; Sun, 25 Oct 2009 03:19:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N1xNh-0007OP-56 for qemu-devel@nongnu.org; Sun, 25 Oct 2009 03:19:17 -0400 Received: from [199.232.76.173] (port=33913 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1xNg-0007OM-UZ for qemu-devel@nongnu.org; Sun, 25 Oct 2009 03:19:12 -0400 Received: from verein.lst.de ([213.95.11.210]:49185) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1N1xNg-000437-GM for qemu-devel@nongnu.org; Sun, 25 Oct 2009 03:19:12 -0400 Date: Sun, 25 Oct 2009 08:19:07 +0100 From: Christoph Hellwig Message-ID: <20091025071907.GA17121@lst.de> References: <1256031192-8292-1-git-send-email-kwolf@redhat.com> <4ADD8D27.7090705@redhat.com> <20091022083156.GC27577@lst.de> <4AE02073.6030403@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AE02073.6030403@redhat.com> Subject: [Qemu-devel] Re: [PATCH] raw/linux-aio: Also initialize POSIX AIO List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Christoph Hellwig , qemu-devel@nongnu.org On Thu, Oct 22, 2009 at 11:05:55AM +0200, Kevin Wolf wrote: > Yes, it might look like overkill to introduce a abstraction for exactly > two backends. I felt the same way. But then, the current implementation > just feels totally wrong. It absolutely intransparent when we fall back > to paio, and before debugging the bdrv_read/write emulation I didn't > even know that we're doing it. And, like I said, why should a block > format driver know what AIO method works which way? Because the aio method is part of the block driver. Despite our code organization linux-aio.c and compat-posix-aio.c aren't generic abstractions but sub-modules of raw-posix. They would be better of beeing renamed to block/raw-posix-aio-linux.c and block/raw-posix-aio-pthreads.c, but with the latency of getting patches into qemu that would just make developing any block code a nightmare while those patches are in the queue.