From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsUXV-0006i7-Dp for qemu-devel@nongnu.org; Wed, 13 May 2015 07:09:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsUXR-0003qY-CU for qemu-devel@nongnu.org; Wed, 13 May 2015 07:09:25 -0400 Date: Wed, 13 May 2015 19:09:14 +0800 From: Fam Zheng Message-ID: <20150513110914.GC30644@ad.nay.redhat.com> References: <1431538099-3286-1-git-send-email-famz@redhat.com> <1431538099-3286-6-git-send-email-famz@redhat.com> <555326F1.708@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <555326F1.708@redhat.com> 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: Paolo Bonzini Cc: Kevin Wolf , qemu-block@nongnu.org, armbru@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com, Stefan Hajnoczi On Wed, 05/13 12:26, Paolo Bonzini wrote: > > > 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? > OK, good idea. Fam