mirror of
https://github.com/mii443/qemu.git
synced 2025-08-26 00:49:39 +00:00
job: Move coroutine and related code to Job
This commit moves some core functions for dealing with the job coroutine from BlockJob to Job. This includes primarily entering the coroutine (both for the first and reentering) and yielding explicitly and at pause points. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
This commit is contained in:
@ -220,8 +220,8 @@ static const BlockJobDriver commit_job_driver = {
|
||||
.instance_size = sizeof(CommitBlockJob),
|
||||
.job_type = JOB_TYPE_COMMIT,
|
||||
.free = block_job_free,
|
||||
.start = commit_run,
|
||||
},
|
||||
.start = commit_run,
|
||||
};
|
||||
|
||||
static int coroutine_fn bdrv_commit_top_preadv(BlockDriverState *bs,
|
||||
@ -371,7 +371,7 @@ void commit_start(const char *job_id, BlockDriverState *bs,
|
||||
s->on_error = on_error;
|
||||
|
||||
trace_commit_start(bs, base, top, s);
|
||||
block_job_start(&s->common);
|
||||
job_start(&s->common.job);
|
||||
return;
|
||||
|
||||
fail:
|
||||
|
Reference in New Issue
Block a user