/* Note: this function is being called from a non qemu thread so we need to be careful about what we do here. Generally we only schedule a BH, and do the rest of the io completion handling from rbd_finish_bh() which runs in a qemu context.  */
static void rbd_finish_aiocb(rbd_completion_t c, RADOSCB *rcb)
/* Note: this function is being called from a non qemu thread so we need to be careful about what we do here. Generally we only schedule a BH, and do the rest of the io completion handling from rbd_finish_bh() which runs in a qemu context.  */
static void rbd_finish_aiocb(rbd_completion_t c, RADOSCB *rcb)
{
    RBDAIOCB *acb = rcb->acb;
    rcb->ret = rbd_aio_get_return_value(c);
    rbd_aio_release(c);
    acb->bh = qemu_bh_new(rbd_finish_bh, rcb);
    qemu_bh_schedule(acb->bh);
}