From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ki9Gl-0006nL-JD for qemu-devel@nongnu.org; Tue, 23 Sep 2008 10:53:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ki9Gj-0006mR-SL for qemu-devel@nongnu.org; Tue, 23 Sep 2008 10:53:39 -0400 Received: from [199.232.76.173] (port=40811 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ki9Gj-0006mO-QC for qemu-devel@nongnu.org; Tue, 23 Sep 2008 10:53:37 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56522) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ki9Gj-0004dA-Dg for qemu-devel@nongnu.org; Tue, 23 Sep 2008 10:53:37 -0400 Message-ID: <48D902EB.8070701@redhat.com> Date: Tue, 23 Sep 2008 16:53:31 +0200 From: Gerd Hoffmann 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> In-Reply-To: <20080923143909.GK31395@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 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: Ryan Harper Cc: Anthony Liguori , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org 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? cheers, Gerd