static void mirror_complete(BlockJob *job, Error **errp)

{

    MirrorBlockJob *s = container_of(job, MirrorBlockJob, common);

    int ret;



    ret = bdrv_open_backing_file(s->target);

    if (ret < 0) {

        char backing_filename[PATH_MAX];

        bdrv_get_full_backing_filename(s->target, backing_filename,

                                       sizeof(backing_filename));

        error_set(errp, QERR_OPEN_FILE_FAILED, backing_filename);

        return;

    }

    if (!s->synced) {

        error_set(errp, QERR_BLOCK_JOB_NOT_READY, job->bs->device_name);

        return;

    }



    s->should_complete = true;

    block_job_resume(job);

}

static void mirror_complete(BlockJob *job, Error **errp)

{

    MirrorBlockJob *s = container_of(job, MirrorBlockJob, common);

    int ret;



    ret = bdrv_open_backing_file(s->target);

    if (ret < 0) {

        char backing_filename[PATH_MAX];

        bdrv_get_full_backing_filename(s->target, backing_filename,

                                       sizeof(backing_filename));

        error_set(errp, QERR_OPEN_FILE_FAILED, backing_filename);

        return;

    }

    if (!s->synced) {

        error_set(errp, QERR_BLOCK_JOB_NOT_READY, job->bs->device_name);

        return;

    }



    s->should_complete = true;

    block_job_resume(job);

}

    ret = bdrv_open_backing_file(s->target);
static void FUNC_0(BlockJob *VAR_0, Error **VAR_1)

{

    MirrorBlockJob *s = container_of(VAR_0, MirrorBlockJob, common);

    int VAR_2;



    VAR_2 = bdrv_open_backing_file(s->target);

    if (VAR_2 < 0) {

        char VAR_3[PATH_MAX];

        bdrv_get_full_backing_filename(s->target, VAR_3,

                                       sizeof(VAR_3));

        error_set(VAR_1, QERR_OPEN_FILE_FAILED, VAR_3);

        return;

    }

    if (!s->synced) {

        error_set(VAR_1, QERR_BLOCK_JOB_NOT_READY, VAR_0->bs->device_name);

        return;

    }



    s->should_complete = true;

    block_job_resume(VAR_0);

}

static void FUNC_0(BlockJob *VAR_0, Error **VAR_1)
{ MirrorBlockJob *s = container_of(VAR_0, MirrorBlockJob, common); int VAR_2; VAR_2 = bdrv_open_backing_file(s->target); if (VAR_2 < 0) { char VAR_3[PATH_MAX]; bdrv_get_full_backing_filename(s->target, VAR_3,
sizeof(VAR_3)); error_set(VAR_1, QERR_OPEN_FILE_FAILED, VAR_3); return; } if (!s->synced) { error_set(VAR_1, QERR_BLOCK_JOB_NOT_READY, VAR_0->bs->device_name); return; } s->should_complete = true; block_job_resume(VAR_0); }