static void quorum_aio_cb(void *opaque, int ret)

{

    QuorumChildRequest *sacb = opaque;

    QuorumAIOCB *acb = sacb->parent;

    BDRVQuorumState *s = acb->common.bs->opaque;



    sacb->ret = ret;

    acb->count++;

    if (ret == 0) {

        acb->success_count++;

    } else {

        quorum_report_bad(acb, sacb->aiocb->bs->node_name, ret);

    }

    assert(acb->count <= s->num_children);

    assert(acb->success_count <= s->num_children);

    if (acb->count < s->num_children) {

        return;

    }



    /* Do the vote on read */

    if (acb->is_read) {

        quorum_vote(acb);

    } else {

        quorum_has_too_much_io_failed(acb);

    }



    quorum_aio_finalize(acb);

}

static void quorum_aio_cb(void *opaque, int ret)

{

    QuorumChildRequest *sacb = opaque;

    QuorumAIOCB *acb = sacb->parent;

    BDRVQuorumState *s = acb->common.bs->opaque;



    sacb->ret = ret;

    acb->count++;

    if (ret == 0) {

        acb->success_count++;

    } else {

        quorum_report_bad(acb, sacb->aiocb->bs->node_name, ret);

    }

    assert(acb->count <= s->num_children);

    assert(acb->success_count <= s->num_children);

    if (acb->count < s->num_children) {

        return;

    }



    

    if (acb->is_read) {

        quorum_vote(acb);

    } else {

        quorum_has_too_much_io_failed(acb);

    }



    quorum_aio_finalize(acb);

}

        quorum_vote(acb);     quorum_aio_finalize(acb);
static void FUNC_0(void *VAR_0, int VAR_1)

{

    QuorumChildRequest *sacb = VAR_0;

    QuorumAIOCB *acb = sacb->parent;

    BDRVQuorumState *s = acb->common.bs->VAR_0;



    sacb->VAR_1 = VAR_1;

    acb->count++;

    if (VAR_1 == 0) {

        acb->success_count++;

    } else {

        quorum_report_bad(acb, sacb->aiocb->bs->node_name, VAR_1);

    }

    assert(acb->count <= s->num_children);

    assert(acb->success_count <= s->num_children);

    if (acb->count < s->num_children) {

        return;

    }



    

    if (acb->is_read) {

        quorum_vote(acb);

    } else {

        quorum_has_too_much_io_failed(acb);

    }



    quorum_aio_finalize(acb);

}

static void FUNC_0(void *VAR_0, int VAR_1)
{ QuorumChildRequest *sacb = VAR_0; QuorumAIOCB *acb = sacb->parent; BDRVQuorumState *s = acb->common.bs->VAR_0; sacb->VAR_1 = VAR_1; acb->count++; if (VAR_1 == 0) { acb->success_count++; } else { quorum_report_bad(acb, sacb->aiocb->bs->node_name, VAR_1); } assert(acb->count <= s->num_children); assert(acb->success_count <= s->num_children); if (acb->count < s->num_children) { return; } if (acb->is_read) { quorum_vote(acb); } else { quorum_has_too_much_io_failed(acb); } quorum_aio_finalize(acb); }