job: Move cancelled to Job

We cannot yet move the whole logic around job cancelling to Job because
it depends on quite a few other things that are still only in BlockJob,
but we can move the cancelled field at least.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
This commit is contained in:
Kevin Wolf 2018-04-17 12:56:07 +02:00
parent 80fa2c756b
commit daa7f2f946
11 changed files with 50 additions and 52 deletions

View file

@ -179,7 +179,7 @@ static void coroutine_fn cancel_job_start(void *opaque)
CancelJob *s = opaque;
while (!s->should_complete) {
if (block_job_is_cancelled(&s->common)) {
if (job_is_cancelled(&s->common.job)) {
goto defer;
}