On Fri, Jun 24, 2016 at 08:39:32PM +0800, Fam Zheng wrote: > AIO based handler is more appropriate here because it will then > cooperate with bdrv_drained_begin/end. It is needed by the coming > revert patch. > > Signed-off-by: Fam Zheng <[email protected]> > --- > hw/block/virtio-blk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > index 284e646..b1f56c3 100644 > --- a/hw/block/virtio-blk.c > +++ b/hw/block/virtio-blk.c > @@ -888,7 +888,7 @@ static void virtio_blk_device_realize(DeviceState *dev, > Error **errp) > s->rq = NULL; > s->sector_mask = (s->conf.conf.logical_block_size / BDRV_SECTOR_SIZE) - > 1; > > - s->vq = virtio_add_queue(vdev, 128, virtio_blk_handle_output); > + s->vq = virtio_add_queue_aio(vdev, 128, virtio_blk_handle_output);
It's weird that virtio_add_queue_aio() doesn't take an AioContext. This change moves us one step closer to dropping dataplane-specific code. The difference between dataplane and non-dataplane should simply by the virtqueue's AioContext, which should come from BlockBackend's AioContext. Anyway, not a deal-breaker but I think we should make the AioContext explicit in the future...
signature.asc
Description: PGP signature
