qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2 5/7] virtio-blk: Call virtio_add_queue_aio


From: Stefan Hajnoczi
Subject: Re: [Qemu-block] [PATCH v2 5/7] virtio-blk: Call virtio_add_queue_aio
Date: Tue, 28 Jun 2016 16:12:44 +0100
User-agent: Mutt/1.6.1 (2016-04-27)

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 <address@hidden>
> ---
>  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...

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]