From b69f777dd9ba992fdd35828a90eefcd88c0ec332 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 20 Apr 2018 17:00:29 +0200 Subject: job: Add job_drain() block_job_drain() contains a blk_drain() call which cannot be moved to Job, so add a new JobDriver callback JobDriver.drain which has a common implementation for all BlockJobs. In addition to this we keep the existing BlockJobDriver.drain callback that is called by the common drain implementation for all block jobs. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/mirror.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'block/mirror.c') diff --git a/block/mirror.c b/block/mirror.c index c3951d1ca2..a579bd8cd1 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -992,6 +992,7 @@ static const BlockJobDriver mirror_job_driver = { .job_type = JOB_TYPE_MIRROR, .free = block_job_free, .user_resume = block_job_user_resume, + .drain = block_job_drain, .start = mirror_run, .pause = mirror_pause, }, @@ -1006,6 +1007,7 @@ static const BlockJobDriver commit_active_job_driver = { .job_type = JOB_TYPE_COMMIT, .free = block_job_free, .user_resume = block_job_user_resume, + .drain = block_job_drain, .start = mirror_run, .pause = mirror_pause, }, -- cgit v1.2.3