ssh: use BlockDriverState's AioContext
Drop the assumption that we're using the main AioContext. Use bdrv_get_aio_context() to register fd handlers in the right AioContext for this BlockDriverState. The .bdrv_detach_aio_context() and .bdrv_attach_aio_context() interfaces are not needed since no fd handlers, timers, or BHs stay registered when requests have been drained. For now this doesn't make much difference but will allow ssh to work in IOThread instances in the future. Acked-by: NRichard W.M. Jones <rjones@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
Showing
想要评论请 注册 或 登录