[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 07/25] curl: implement .bdrv_detach/attach_ai
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH v3 07/25] curl: implement .bdrv_detach/attach_aio_context() |
Date: |
Tue, 13 May 2014 10:06:40 +0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, 05/08 16:34, Stefan Hajnoczi wrote:
> The curl block driver uses fd handlers, timers, and BHs. The fd
> handlers and timers are managed on behalf of libcurl, which controls
> them using callback functions that the block driver implements.
>
> The simplest way to implement .bdrv_detach/attach_aio_context() is to
> clean up libcurl in the old event loop and initialize it again in the
> new event loop. We do not need to keep track of anything since there
> are no pending requests when the AioContext is changed.
>
> Also make sure to use aio_set_fd_handler() instead of
> qemu_aio_set_fd_handler() and aio_bh_new() instead of qemu_bh_new() so
> the current AioContext is passed in.
>
> Cc: Alexander Graf <address@hidden>
> Cc: Fam Zheng <address@hidden>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
Looks good to me,
Reviewed-by: Fam Zheng <address@hidden>
- [Qemu-devel] [PATCH v3 00/25] dataplane: use QEMU block layer, Stefan Hajnoczi, 2014/05/08
- [Qemu-devel] [PATCH v3 01/25] block: use BlockDriverState AioContext, Stefan Hajnoczi, 2014/05/08
- [Qemu-devel] [PATCH v3 02/25] block: acquire AioContext in bdrv_*_all(), Stefan Hajnoczi, 2014/05/08
- [Qemu-devel] [PATCH v3 03/25] block: acquire AioContext in bdrv_drain_all(), Stefan Hajnoczi, 2014/05/08
- [Qemu-devel] [PATCH v3 04/25] block: add bdrv_set_aio_context(), Stefan Hajnoczi, 2014/05/08
- [Qemu-devel] [PATCH v3 05/25] blkdebug: use BlockDriverState's AioContext, Stefan Hajnoczi, 2014/05/08
- [Qemu-devel] [PATCH v3 07/25] curl: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/05/08
- Re: [Qemu-devel] [PATCH v3 07/25] curl: implement .bdrv_detach/attach_aio_context(),
Fam Zheng <=
- [Qemu-devel] [PATCH v3 08/25] gluster: use BlockDriverState's AioContext, Stefan Hajnoczi, 2014/05/08
- [Qemu-devel] [PATCH v3 09/25] iscsi: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/05/08
- [Qemu-devel] [PATCH v3 14/25] block/raw-posix: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/05/08
- [Qemu-devel] [PATCH v3 15/25] block/linux-aio: fix memory and fd leak, Stefan Hajnoczi, 2014/05/08
- [Qemu-devel] [PATCH v3 16/25] block/raw-win32: create one QEMUWin32AIOState per BDRVRawState, Stefan Hajnoczi, 2014/05/08
- [Qemu-devel] [PATCH v3 17/25] block/raw-win32: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/05/08
- [Qemu-devel] [PATCH v3 18/25] rbd: use BlockDriverState's AioContext, Stefan Hajnoczi, 2014/05/08