From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53432 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODdnG-000193-2D for qemu-devel@nongnu.org; Sun, 16 May 2010 09:22:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODdnE-000292-JA for qemu-devel@nongnu.org; Sun, 16 May 2010 09:22:09 -0400 Received: from verein.lst.de ([213.95.11.210]:44289) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODdnE-00027h-5m for qemu-devel@nongnu.org; Sun, 16 May 2010 09:22:08 -0400 Date: Sun, 16 May 2010 15:21:59 +0200 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH] block: fix aio_flush segfaults for read-only protocols (e.g. curl) Message-ID: <20100516132159.GA26872@lst.de> References: <1274011197-26196-1-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1274011197-26196-1-git-send-email-avi@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Kevin Wolf , qemu-devel@nongnu.org On Sun, May 16, 2010 at 02:59:57PM +0300, Avi Kivity wrote: > Not all block format drivers expose an io_flush method (reasonable for > read-only protocols), so calling io_flush there will immediately segfault. > > Fix by checking for the method's existence before calling it. Looks good, Reviewed-by: Christoph Hellwig