aboutsummaryrefslogtreecommitdiff
path: root/block/backup.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-04-17 12:56:07 +0200
committerKevin Wolf <kwolf@redhat.com>2018-05-23 14:30:49 +0200
commitdaa7f2f9467bc5624f04f28d4b01b88f08c6589c (patch)
treec1e663d665ae433ea35a1d8f9b8974e2465e693c /block/backup.c
parent80fa2c756b3241f24015a7503a01f7999d4a942d (diff)
downloadqemu-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/backup.c')
-rw-r--r--block/backup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/backup.c b/block/backup.c
index cfdb89d..ef0aa0e 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -329,7 +329,7 @@ static bool coroutine_fn yield_and_check(BackupBlockJob *job)
{
uint64_t delay_ns;
- if (block_job_is_cancelled(&job->common)) {
+ if (job_is_cancelled(&job->common.job)) {
return true;
}
@@ -339,7 +339,7 @@ static bool coroutine_fn yield_and_check(BackupBlockJob *job)
job->bytes_read = 0;
block_job_sleep_ns(&job->common, delay_ns);
- if (block_job_is_cancelled(&job->common)) {
+ if (job_is_cancelled(&job->common.job)) {
return true;
}
@@ -441,7 +441,7 @@ static void coroutine_fn backup_run(void *opaque)
if (job->sync_mode == MIRROR_SYNC_MODE_NONE) {
/* All bits are set in copy_bitmap to allow any cluster to be copied.
* This does not actually require them to be copied. */
- while (!block_job_is_cancelled(&job->common)) {
+ while (!job_is_cancelled(&job->common.job)) {
/* Yield until the job is cancelled. We just let our before_write
* notify callback service CoW requests. */
block_job_yield(&job->common);