/* Cancel aio. Since we don't reference acb in a non qemu threads, it is safe to access it here.  */
static void qemu_rbd_aio_cancel(BlockDriverAIOCB *blockacb)
/* Cancel aio. Since we don't reference acb in a non qemu threads, it is safe to access it here.  */
static void qemu_rbd_aio_cancel(BlockDriverAIOCB *blockacb)
{
    RBDAIOCB *acb = (RBDAIOCB *) blockacb;
    acb->cancelled = 1;
    while (acb->status == -EINPROGRESS) {
        qemu_aio_wait();
    }
    qemu_aio_release(acb);
}