From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWrzt-0006r1-6R for qemu-devel@nongnu.org; Tue, 22 May 2012 12:31:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWrzr-0005oV-Cb for qemu-devel@nongnu.org; Tue, 22 May 2012 12:31:44 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:48339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWrzr-0005kl-6W for qemu-devel@nongnu.org; Tue, 22 May 2012 12:31:43 -0400 Message-ID: <4FBBBF64.5010607@msgid.tls.msk.ru> Date: Tue, 22 May 2012 20:31:32 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <4FBA1CC4.7020009@redhat.com> <4FBB5C91.4060504@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Weird iscsi/fd-event issue since recent merge of event system changes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ronnie sahlberg Cc: Kevin Wolf , Paolo Bonzini , qemu-devel , Stefan Hajnoczi , Stefan Hajnoczi On 22.05.2012 14:03, ronnie sahlberg wrote: [] >>> Doh, now I remember. Whenever you change the aio handlers you need to >>> call qemu_notify_event() afterwards, if the handler may fire right away. >> >> Thanks. I just confirmed that qemu_notify_event() fixes the issue. >> Ill send a patch that uses qemu_notify_event() and a comment why this is needed. When I were writing network block driver I tried to not call qemu_aio_set_fd_handler() unless absolutely necessary -- that is, trying to write as much as possible till the next write returns EAGAIN, or to read till the next read returns EAGAIN. This way there's no need to call qemu_notify_event(). FWIW. /mjt