static int sd_schedule_bh(QEMUBHFunc *cb, SheepdogAIOCB *acb)

{

    if (acb->bh) {

        error_report("bug: %d %d\n", acb->aiocb_type, acb->aiocb_type);

        return -EIO;

    }



    acb->bh = qemu_bh_new(cb, acb);

    if (!acb->bh) {

        error_report("oom: %d %d\n", acb->aiocb_type, acb->aiocb_type);

        return -EIO;

    }



    qemu_bh_schedule(acb->bh);



    return 0;

}

static int sd_schedule_bh(QEMUBHFunc *cb, SheepdogAIOCB *acb)

{

    if (acb->bh) {

        error_report("bug: %d %d\n", acb->aiocb_type, acb->aiocb_type);

        return -EIO;

    }



    acb->bh = qemu_bh_new(cb, acb);

    if (!acb->bh) {

        error_report("oom: %d %d\n", acb->aiocb_type, acb->aiocb_type);

        return -EIO;

    }



    qemu_bh_schedule(acb->bh);



    return 0;

}

static int FUNC_0(QEMUBHFunc *VAR_0, SheepdogAIOCB *VAR_1)

{

    if (VAR_1->bh) {

        error_report("bug: %d %d\n", VAR_1->aiocb_type, VAR_1->aiocb_type);

        return -EIO;

    }



    VAR_1->bh = qemu_bh_new(VAR_0, VAR_1);

    if (!VAR_1->bh) {

        error_report("oom: %d %d\n", VAR_1->aiocb_type, VAR_1->aiocb_type);

        return -EIO;

    }



    qemu_bh_schedule(VAR_1->bh);



    return 0;

}

static int FUNC_0(QEMUBHFunc *VAR_0, SheepdogAIOCB *VAR_1)
{ if (VAR_1->bh) { error_report("bug: %d %d\n", VAR_1->aiocb_type, VAR_1->aiocb_type); return -EIO; } VAR_1->bh = qemu_bh_new(VAR_0, VAR_1); if (!VAR_1->bh) { error_report("oom: %d %d\n", VAR_1->aiocb_type, VAR_1->aiocb_type); return -EIO; } qemu_bh_schedule(VAR_1->bh); return 0; }