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:
Kevin Wolf 2018-04-13 17:31:02 +02:00
parent 1908a5590c
commit da01ff7f38
14 changed files with 305 additions and 299 deletions

View file

@ -528,8 +528,8 @@ static const BlockJobDriver backup_job_driver = {
.instance_size = sizeof(BackupBlockJob),
.job_type = JOB_TYPE_BACKUP,
.free = block_job_free,
.start = backup_run,
},
.start = backup_run,
.commit = backup_commit,
.abort = backup_abort,
.clean = backup_clean,