void mirror_start(const char *job_id, BlockDriverState *bs,

                  BlockDriverState *target, const char *replaces,

                  int64_t speed, uint32_t granularity, int64_t buf_size,

                  MirrorSyncMode mode, BlockMirrorBackingMode backing_mode,

                  BlockdevOnError on_source_error,

                  BlockdevOnError on_target_error,

                  bool unmap,

                  BlockCompletionFunc *cb,

                  void *opaque, Error **errp)

{

    bool is_none_mode;

    BlockDriverState *base;



    if (mode == MIRROR_SYNC_MODE_INCREMENTAL) {

        error_setg(errp, "Sync mode 'incremental' not supported");

        return;

    }

    is_none_mode = mode == MIRROR_SYNC_MODE_NONE;

    base = mode == MIRROR_SYNC_MODE_TOP ? backing_bs(bs) : NULL;

    mirror_start_job(job_id, bs, target, replaces,

                     speed, granularity, buf_size, backing_mode,

                     on_source_error, on_target_error, unmap, cb, opaque, errp,

                     &mirror_job_driver, is_none_mode, base);

}

void mirror_start(const char *job_id, BlockDriverState *bs,

                  BlockDriverState *target, const char *replaces,

                  int64_t speed, uint32_t granularity, int64_t buf_size,

                  MirrorSyncMode mode, BlockMirrorBackingMode backing_mode,

                  BlockdevOnError on_source_error,

                  BlockdevOnError on_target_error,

                  bool unmap,

                  BlockCompletionFunc *cb,

                  void *opaque, Error **errp)

{

    bool is_none_mode;

    BlockDriverState *base;



    if (mode == MIRROR_SYNC_MODE_INCREMENTAL) {

        error_setg(errp, "Sync mode 'incremental' not supported");

        return;

    }

    is_none_mode = mode == MIRROR_SYNC_MODE_NONE;

    base = mode == MIRROR_SYNC_MODE_TOP ? backing_bs(bs) : NULL;

    mirror_start_job(job_id, bs, target, replaces,

                     speed, granularity, buf_size, backing_mode,

                     on_source_error, on_target_error, unmap, cb, opaque, errp,

                     &mirror_job_driver, is_none_mode, base);

}

void FUNC_0(const char *VAR_0, BlockDriverState *VAR_1,

                  BlockDriverState *VAR_2, const char *VAR_3,

                  int64_t VAR_4, uint32_t VAR_5, int64_t VAR_6,

                  MirrorSyncMode VAR_7, BlockMirrorBackingMode VAR_8,

                  BlockdevOnError VAR_9,

                  BlockdevOnError VAR_10,

                  bool VAR_11,

                  BlockCompletionFunc *VAR_12,

                  void *VAR_13, Error **VAR_14)

{

    bool is_none_mode;

    BlockDriverState *base;



    if (VAR_7 == MIRROR_SYNC_MODE_INCREMENTAL) {

        error_setg(VAR_14, "Sync VAR_7 'incremental' not supported");

        return;

    }

    is_none_mode = VAR_7 == MIRROR_SYNC_MODE_NONE;

    base = VAR_7 == MIRROR_SYNC_MODE_TOP ? backing_bs(VAR_1) : NULL;

    mirror_start_job(VAR_0, VAR_1, VAR_2, VAR_3,

                     VAR_4, VAR_5, VAR_6, VAR_8,

                     VAR_9, VAR_10, VAR_11, VAR_12, VAR_13, VAR_14,

                     &mirror_job_driver, is_none_mode, base);

}

void FUNC_0(const char *VAR_0, BlockDriverState *VAR_1,
BlockDriverState *VAR_2, const char *VAR_3,
int64_t VAR_4, uint32_t VAR_5, int64_t VAR_6,
MirrorSyncMode VAR_7, BlockMirrorBackingMode VAR_8,
BlockdevOnError VAR_9,
BlockdevOnError VAR_10,
bool VAR_11,
BlockCompletionFunc *VAR_12,
void *VAR_13, Error **VAR_14)
{ bool is_none_mode; BlockDriverState *base; if (VAR_7 == MIRROR_SYNC_MODE_INCREMENTAL) { error_setg(VAR_14, "Sync VAR_7 'incremental' not supported"); return; } is_none_mode = VAR_7 == MIRROR_SYNC_MODE_NONE; base = VAR_7 == MIRROR_SYNC_MODE_TOP ? backing_bs(VAR_1) : NULL; mirror_start_job(VAR_0, VAR_1, VAR_2, VAR_3,
VAR_4, VAR_5, VAR_6, VAR_8,
VAR_9, VAR_10, VAR_11, VAR_12, VAR_13, VAR_14,
&mirror_job_driver, is_none_mode, base); }