From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KiAQU-0003Lr-8j for qemu-devel@nongnu.org; Tue, 23 Sep 2008 12:07:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KiAQS-0003LF-A9 for qemu-devel@nongnu.org; Tue, 23 Sep 2008 12:07:45 -0400 Received: from [199.232.76.173] (port=40029 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KiAQS-0003L8-5r for qemu-devel@nongnu.org; Tue, 23 Sep 2008 12:07:44 -0400 Received: from e6.ny.us.ibm.com ([32.97.182.146]:51670) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KiAQR-0005zO-Ht for qemu-devel@nongnu.org; Tue, 23 Sep 2008 12:07:43 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id m8NGADRW020122 for ; Tue, 23 Sep 2008 12:10:13 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m8NG7OFS133782 for ; Tue, 23 Sep 2008 12:07:24 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m8NG7Oj0021880 for ; Tue, 23 Sep 2008 12:07:24 -0400 Message-ID: <48D91403.8090007@us.ibm.com> Date: Tue, 23 Sep 2008 11:06:27 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 2/3] Move aio implementation out of raw block driver References: <1222125454-21744-1-git-send-email-ryanh@us.ibm.com> <1222125454-21744-3-git-send-email-ryanh@us.ibm.com> <48D85849.2080302@us.ibm.com> <20080923143909.GK31395@us.ibm.com> <48D902EB.8070701@redhat.com> In-Reply-To: <48D902EB.8070701@redhat.com> 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: Gerd Hoffmann Cc: Ryan Harper , qemu-devel@nongnu.org, kvm@vger.kernel.org, Marcelo Tosatti Gerd Hoffmann wrote: > Ryan Harper wrote: > >>> So what happens if !defined(CONFIG_AIO)? By my reading of the code, >>> aio_drv will be NULL and this will SEGV. >>> >> raw_aio_read/write/cancel aren't included in the bdrv structure unless >> CONFIG_AIO is defined. Rather in bdrv_register, the aio emulation >> functions are used instead. >> > > How about providing a aio interface implementation which simply uses > read/write syscalls (thereby not being really async obviously)? Then > use that as fallback instead of aio emulation? And also drop CONFIG_AIO > then? > Yeah, this is basically what block-raw-posix does today. I was thinking the same thing. I was also thinking that you could do an aio implementation for win32 and possibly reunify block-raw-posix and block-raw-linux. But before going down this route, I want to see if linux-aio is really the right tool for the job. Regards, Anthony Liguori > cheers, > Gerd >