Re: [Qemu-devel] [PATCH v2 05/11] virtio-blk: Don't handle output when there is "device IO" op blocker

2015-05-13 Thread Fam Zheng
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_

Re: [Qemu-devel] [PATCH v2 05/11] virtio-blk: Don't handle output when there is "device IO" op blocker

2015-05-13 Thread Paolo Bonzini
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); > +} > + > +stati

[Qemu-devel] [PATCH v2 05/11] virtio-blk: Don't handle output when there is "device IO" op blocker

2015-05-13 Thread Fam Zheng
virtio-blk now listens to op blocker change of the associated block backend. Up on setting op blocker on BLOCK_OP_TYPE_DEVICE_IO: non-dataplane: 1) Set VirtIOBlock.paused 2) In virtio_blk_handle_output, do nothing if VirtIOBlock.paused dataplane: 1) Clear the host event notifier