rbd: use BlockDriverState's AioContext
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 8 May 2014 14:34:51 +0000 (16:34 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 4 Jun 2014 07:56:12 +0000 (09:56 +0200)
commitea8001914924331549e9b876bcaeac2dc80db2b6
tree4b21354f87a878b5304aa97d6e0c6e6a4c3832b2
parent85ebd381fdae2d551cd6a0ffff47ab08734edf12
rbd: use BlockDriverState's AioContext

Drop the assumption that we're using the main AioContext.  Convert
qemu_bh_new() to aio_bh_new() and qemu_aio_wait() to aio_poll().

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.

Cc: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
block/rbd.c