static void mirror_write_complete(void *opaque, int ret)

{

    MirrorOp *op = opaque;

    MirrorBlockJob *s = op->s;

    if (ret < 0) {

        BlockDriverState *source = s->common.bs;

        BlockErrorAction action;



        bdrv_set_dirty(source, op->sector_num, op->nb_sectors);

        action = mirror_error_action(s, false, -ret);

        if (action == BLOCK_ERROR_ACTION_REPORT && s->ret >= 0) {

            s->ret = ret;

        }

    }

    mirror_iteration_done(op, ret);

}

static void mirror_write_complete(void *opaque, int ret)

{

    MirrorOp *op = opaque;

    MirrorBlockJob *s = op->s;

    if (ret < 0) {

        BlockDriverState *source = s->common.bs;

        BlockErrorAction action;



        bdrv_set_dirty(source, op->sector_num, op->nb_sectors);

        action = mirror_error_action(s, false, -ret);

        if (action == BLOCK_ERROR_ACTION_REPORT && s->ret >= 0) {

            s->ret = ret;

        }

    }

    mirror_iteration_done(op, ret);

}

        bdrv_set_dirty(source, op->sector_num, op->nb_sectors);         bdrv_set_dirty(source, op->sector_num, op->nb_sectors);
static void FUNC_0(void *VAR_0, int VAR_1)

{

    MirrorOp *op = VAR_0;

    MirrorBlockJob *s = op->s;

    if (VAR_1 < 0) {

        BlockDriverState *source = s->common.bs;

        BlockErrorAction action;



        bdrv_set_dirty(source, op->sector_num, op->nb_sectors);

        action = mirror_error_action(s, false, -VAR_1);

        if (action == BLOCK_ERROR_ACTION_REPORT && s->VAR_1 >= 0) {

            s->VAR_1 = VAR_1;

        }

    }

    mirror_iteration_done(op, VAR_1);

}

static void FUNC_0(void *VAR_0, int VAR_1)
{ MirrorOp *op = VAR_0; MirrorBlockJob *s = op->s; if (VAR_1 < 0) { BlockDriverState *source = s->common.bs; BlockErrorAction action; bdrv_set_dirty(source, op->sector_num, op->nb_sectors); action = mirror_error_action(s, false, -VAR_1); if (action == BLOCK_ERROR_ACTION_REPORT && s->VAR_1 >= 0) { s->VAR_1 = VAR_1; } } mirror_iteration_done(op, VAR_1); }