diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2019-08-29 12:09:53 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-09-10 08:58:43 +0200 |
commit | bb0c94099382b52734a4a4f3c060e90c9a2ac6cf (patch) | |
tree | ac02b2959676479a50414ee2144fc433681526b1 /blockjob.c | |
parent | b70d08205b2e4044c529eefc21df2c8ab61b473b (diff) |
job: drop job_drain
In job_finish_sync job_enter should be enough for a job to make some
progress and draining is a wrong tool for it. So use job_enter directly
here and drop job_drain with all related staff not used more.
Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tested-by: John Snow <jsnow@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockjob.c')
-rw-r--r-- | blockjob.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/blockjob.c b/blockjob.c index 6e32d1a0c0..2abed0f551 100644 --- a/blockjob.c +++ b/blockjob.c @@ -90,18 +90,6 @@ void block_job_free(Job *job) error_free(bjob->blocker); } -void block_job_drain(Job *job) -{ - BlockJob *bjob = container_of(job, BlockJob, job); - const JobDriver *drv = job->driver; - BlockJobDriver *bjdrv = container_of(drv, BlockJobDriver, job_driver); - - blk_drain(bjob->blk); - if (bjdrv->drain) { - bjdrv->drain(bjob); - } -} - static char *child_job_get_parent_desc(BdrvChild *c) { BlockJob *job = c->opaque; @@ -422,7 +410,6 @@ void *block_job_create(const char *job_id, const BlockJobDriver *driver, assert(is_block_job(&job->job)); assert(job->job.driver->free == &block_job_free); assert(job->job.driver->user_resume == &block_job_user_resume); - assert(job->job.driver->drain == &block_job_drain); job->blk = blk; |