.job_driver = {
.instance_size = sizeof(BackupBlockJob),
},
- .job_type = BLOCK_JOB_TYPE_BACKUP,
+ .job_type = JOB_TYPE_BACKUP,
.start = backup_run,
.commit = backup_commit,
.abort = backup_abort,
.job_driver = {
.instance_size = sizeof(CommitBlockJob),
},
- .job_type = BLOCK_JOB_TYPE_COMMIT,
+ .job_type = JOB_TYPE_COMMIT,
.start = commit_run,
};
.job_driver = {
.instance_size = sizeof(MirrorBlockJob),
},
- .job_type = BLOCK_JOB_TYPE_MIRROR,
+ .job_type = JOB_TYPE_MIRROR,
.start = mirror_run,
.complete = mirror_complete,
.pause = mirror_pause,
.job_driver = {
.instance_size = sizeof(MirrorBlockJob),
},
- .job_type = BLOCK_JOB_TYPE_COMMIT,
+ .job_type = JOB_TYPE_COMMIT,
.start = mirror_run,
.complete = mirror_complete,
.pause = mirror_pause,
.job_driver = {
.instance_size = sizeof(StreamBlockJob),
},
- .job_type = BLOCK_JOB_TYPE_STREAM,
+ .job_type = JOB_TYPE_STREAM,
.start = stream_run,
};
{
BlockJob *job = c->opaque;
return g_strdup_printf("%s job '%s'",
- BlockJobType_str(job->driver->job_type),
+ JobType_str(job->driver->job_type),
job->job.id);
}
return NULL;
}
info = g_new0(BlockJobInfo, 1);
- info->type = g_strdup(BlockJobType_str(job->driver->job_type));
+ info->type = g_strdup(JobType_str(job->driver->job_type));
info->device = g_strdup(job->job.id);
info->len = job->len;
info->busy = atomic_read(&job->busy);
block_job_sleep_timer_cb, job);
error_setg(&job->blocker, "block device is in use by block job: %s",
- BlockJobType_str(driver->job_type));
+ JobType_str(driver->job_type));
block_job_add_bdrv(job, "main node", bs, 0, BLK_PERM_ALL, &error_abort);
bs->job = job;
JobDriver job_driver;
/** String describing the operation, part of query-block-jobs QMP API */
- BlockJobType job_type;
+ JobType job_type;
/** Mandatory: Entrypoint for the Coroutine. */
CoroutineEntry *start;
'data': ['top', 'full', 'none', 'incremental'] }
##
-# @BlockJobType:
+# @JobType:
#
-# Type of a block job.
+# Type of a background job.
#
# @commit: block commit job type, see "block-commit"
#
#
# Since: 1.7
##
-{ 'enum': 'BlockJobType',
+{ 'enum': 'JobType',
'data': ['commit', 'stream', 'mirror', 'backup'] }
##
#
##
{ 'event': 'BLOCK_JOB_COMPLETED',
- 'data': { 'type' : 'BlockJobType',
+ 'data': { 'type' : 'JobType',
'device': 'str',
'len' : 'int',
'offset': 'int',
#
##
{ 'event': 'BLOCK_JOB_CANCELLED',
- 'data': { 'type' : 'BlockJobType',
+ 'data': { 'type' : 'JobType',
'device': 'str',
'len' : 'int',
'offset': 'int',
#
##
{ 'event': 'BLOCK_JOB_READY',
- 'data': { 'type' : 'BlockJobType',
+ 'data': { 'type' : 'JobType',
'device': 'str',
'len' : 'int',
'offset': 'int',
#
##
{ 'event': 'BLOCK_JOB_PENDING',
- 'data': { 'type' : 'BlockJobType',
+ 'data': { 'type' : 'JobType',
'id' : 'str' } }
##