From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0t5a-0005t8-EB for qemu-devel@nongnu.org; Thu, 22 Oct 2009 04:32:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0t5V-0005sS-Mt for qemu-devel@nongnu.org; Thu, 22 Oct 2009 04:32:05 -0400 Received: from [199.232.76.173] (port=51680 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0t5V-0005sP-IC for qemu-devel@nongnu.org; Thu, 22 Oct 2009 04:32:01 -0400 Received: from verein.lst.de ([213.95.11.210]:53011) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1N0t5U-00009H-Uu for qemu-devel@nongnu.org; Thu, 22 Oct 2009 04:32:01 -0400 Date: Thu, 22 Oct 2009 10:31:56 +0200 From: Christoph Hellwig Message-ID: <20091022083156.GC27577@lst.de> References: <1256031192-8292-1-git-send-email-kwolf@redhat.com> <4ADD8D27.7090705@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ADD8D27.7090705@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: qemu-devel@nongnu.org, Christoph Hellwig On Tue, Oct 20, 2009 at 12:12:55PM +0200, Kevin Wolf wrote: > On that note, falling back to POSIX AIO means that paio_submit is called > with a Linux AIO aio_ctx. Which works because this parameter is unused > anyway, but am I the only one to find this ugly? > > What is the public interface of paio_submit meant to look like at all? > If aio_ctx is guaranteed to be unused, why not drop it or pass NULL at > least? And if it could be used some time in the future, the raw block > driver needs to be fixed. Agreed. Cared to send a patch? > That said, I don't even think that the raw block driver is the right > place to distinguish between different AIO variants. Having a generic > aio_submit that calls the right AIO driver depending on the context > would be much cleaner. This would also mean that laio_submit handles the > fallback to paio_submit on its own, which I think is much cleaner than > teaching raw about the capabilities of each driver. Seems a bit overkill until we get even more AIO variants at least. And yes, that whole area is really ugly.