From 5d43e86e11f488fda7956b13160e0c0105a84845 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 18 Apr 2018 16:32:20 +0200 Subject: job: Add job_sleep_ns() There is nothing block layer specific about block_job_sleep_ns(), so move the function to Job. Signed-off-by: Kevin Wolf Reviewed-by: John Snow Reviewed-by: Max Reitz --- block/mirror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'block/mirror.c') diff --git a/block/mirror.c b/block/mirror.c index 95fc8072b0..5d8f75c677 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -595,7 +595,7 @@ static void mirror_throttle(MirrorBlockJob *s) if (now - s->last_pause_ns > BLOCK_JOB_SLICE_TIME) { s->last_pause_ns = now; - block_job_sleep_ns(&s->common, 0); + job_sleep_ns(&s->common.job, 0); } else { job_pause_point(&s->common.job); } @@ -869,7 +869,7 @@ static void coroutine_fn mirror_run(void *opaque) cnt == 0 ? BLOCK_JOB_SLICE_TIME : 0); } trace_mirror_before_sleep(s, cnt, s->synced, delay_ns); - block_job_sleep_ns(&s->common, delay_ns); + job_sleep_ns(&s->common.job, delay_ns); if (job_is_cancelled(&s->common.job) && (!s->synced || s->common.force)) { -- cgit v1.2.3