[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...
signature.asc
Description: PGP signature
- [Qemu-block] [PATCH v2 1/7] virtio-bus: Drop "set_handler" parameter, (continued)
- [Qemu-block] [PATCH v2 1/7] virtio-bus: Drop "set_handler" parameter, Fam Zheng, 2016/06/24
- [Qemu-block] [PATCH v2 2/7] virtio: Add typedef for handle_output, Fam Zheng, 2016/06/24
- [Qemu-block] [PATCH v2 4/7] virtio: Use aio_set_event_notifier for aio vq, Fam Zheng, 2016/06/24
- [Qemu-block] [PATCH v2 3/7] virtio: Introduce virtio_add_queue_aio, Fam Zheng, 2016/06/24
- [Qemu-block] [PATCH v2 6/7] virtio-scsi: Call virtio_add_queue_aio, Fam Zheng, 2016/06/24
- [Qemu-block] [PATCH v2 5/7] virtio-blk: Call virtio_add_queue_aio, Fam Zheng, 2016/06/24
- Re: [Qemu-block] [PATCH v2 5/7] virtio-blk: Call virtio_add_queue_aio,
Stefan Hajnoczi <=
- [Qemu-block] [PATCH v2 7/7] Revert "mirror: Workaround for unexpected iohandler events during completion", Fam Zheng, 2016/06/24
- Re: [Qemu-block] [PATCH v2 0/7] virtio: Merge virtio-{blk, scsi} host notifier handling paths, Stefan Hajnoczi, 2016/06/28