diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-04-17 12:56:07 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-05-23 14:30:49 +0200 |
commit | daa7f2f9467bc5624f04f28d4b01b88f08c6589c (patch) | |
tree | c1e663d665ae433ea35a1d8f9b8974e2465e693c /block/commit.c | |
parent | 80fa2c756b3241f24015a7503a01f7999d4a942d (diff) | |
download | qemu-daa7f2f9467bc5624f04f28d4b01b88f08c6589c.zip qemu-daa7f2f9467bc5624f04f28d4b01b88f08c6589c.tar.gz qemu-daa7f2f9467bc5624f04f28d4b01b88f08c6589c.tar.bz2 |
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>
Diffstat (limited to 'block/commit.c')
-rw-r--r-- | block/commit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/commit.c b/block/commit.c index 925c96a..85baea8 100644 --- a/block/commit.c +++ b/block/commit.c @@ -90,7 +90,7 @@ static void commit_complete(BlockJob *job, void *opaque) * the normal backing chain can be restored. */ blk_unref(s->base); - if (!block_job_is_cancelled(&s->common) && ret == 0) { + if (!job_is_cancelled(&s->common.job) && ret == 0) { /* success */ ret = bdrv_drop_intermediate(s->commit_top_bs, base, s->backing_file_str); @@ -172,7 +172,7 @@ static void coroutine_fn commit_run(void *opaque) * with no pending I/O here so that bdrv_drain_all() returns. */ block_job_sleep_ns(&s->common, delay_ns); - if (block_job_is_cancelled(&s->common)) { + if (job_is_cancelled(&s->common.job)) { break; } /* Copy if allocated above the base */ |