From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsTsa-0000AJ-S1 for qemu-devel@nongnu.org; Wed, 13 May 2015 06:27:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsTsZ-00035y-KL for qemu-devel@nongnu.org; Wed, 13 May 2015 06:27:08 -0400 Message-ID: <555326F1.708@redhat.com> Date: Wed, 13 May 2015 12:26:57 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1431538099-3286-1-git-send-email-famz@redhat.com> <1431538099-3286-6-git-send-email-famz@redhat.com> In-Reply-To: <1431538099-3286-6-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 05/11] virtio-blk: Don't handle output when there is "device IO" op blocker List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, jcody@redhat.com, armbru@redhat.com, mreitz@redhat.com, Stefan Hajnoczi On 13/05/2015 19:28, Fam Zheng wrote: > +static void virtio_blk_data_plane_pause(VirtIOBlock *vblk) > +{ > + VirtIOBlockDataPlane *s = vblk->dataplane; > + > + event_notifier_test_and_clear(&s->host_notifier); > + aio_set_event_notifier(s->ctx, &s->host_notifier, NULL); > +} > + > +static void handle_notify(EventNotifier *e); > +static void virtio_blk_data_plane_resume(VirtIOBlock *vblk) > +{ > + VirtIOBlockDataPlane *s = vblk->dataplane; > + > + aio_set_event_notifier(s->ctx, &s->host_notifier, handle_notify); > + > + event_notifier_set(&s->host_notifier); > +} Perhaps add a note that these are called under aio_context_acquire? Paolo