From 198c49cc8d81e8eb0df3749d395599895c3a3a76 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 24 Apr 2018 16:55:04 +0200 Subject: job: Add job_yield() This moves block_job_yield() to the Job layer. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/backup.c | 2 +- block/mirror.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'block') diff --git a/block/backup.c b/block/backup.c index b13f91d8a7..6f4f3df229 100644 --- a/block/backup.c +++ b/block/backup.c @@ -444,7 +444,7 @@ static void coroutine_fn backup_run(void *opaque) 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); + job_yield(&job->common.job); } } else if (job->sync_mode == MIRROR_SYNC_MODE_INCREMENTAL) { ret = backup_run_incremental(job); diff --git a/block/mirror.c b/block/mirror.c index c63cf7cbc9..687f955c22 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -731,7 +731,7 @@ static void coroutine_fn mirror_run(void *opaque) block_job_event_ready(&s->common); s->synced = true; while (!job_is_cancelled(&s->common.job) && !s->should_complete) { - block_job_yield(&s->common); + job_yield(&s->common.job); } s->common.job.cancelled = false; goto immediate_exit; -- cgit v1.2.3