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 <ag...@suse.de> > Cc: Fam Zheng <f...@redhat.com> > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
Looks good to me, Reviewed-by: Fam Zheng <f...@redhat.com>