From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R64jj-0001xs-K7 for qemu-devel@nongnu.org; Tue, 20 Sep 2011 14:08:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R64ji-0002Ee-LC for qemu-devel@nongnu.org; Tue, 20 Sep 2011 14:08:03 -0400 Received: from verein.lst.de ([213.95.11.211]:60590 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R64ji-0002EW-GS for qemu-devel@nongnu.org; Tue, 20 Sep 2011 14:08:02 -0400 Date: Tue, 20 Sep 2011 20:08:00 +0200 From: Christoph Hellwig Message-ID: <20110920180800.GA28285@lst.de> References: <1316433257-4863-1-git-send-email-freddy77@gmail.com> <1316433257-4863-3-git-send-email-freddy77@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 2/2] block: avoid SIGUSR2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kwolf@redhat.com, aliguori@us.ibm.com, Frediano Ziglio , qemu-devel@nongnu.org On Mon, Sep 19, 2011 at 03:05:47PM +0100, Stefan Hajnoczi wrote: > On Mon, Sep 19, 2011 at 12:54 PM, Frediano Ziglio wrote: > > @@ -547,7 +549,7 @@ static int posix_aio_flush(void *opaque) > > > > ?static PosixAioState *posix_aio_state; > > > > -static void aio_signal_handler(int signum) > > +static void posix_aio_notify_event(void) > > ?{ > > ? ? if (posix_aio_state) { > > Seems like this if statement is always true, hence the condition can > be removed. The posix_aio_state global is always non-NULL here. It is. In addition to dropping it I'd also recommend moving the function up so that it's above it's caller. Btw, what is the point of the qemu_service_io? Calling qemu_notify_event directly would seem a lot more obvious, given that the name actually gives a hint on what it actually does.