diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-04-23 12:24:16 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-05-23 14:30:50 +0200 |
commit | 3453d97243c72988c89a0105fa9546890eae7bd4 (patch) | |
tree | b1319fc9423528d2bcb84e8378e877f25e6bd248 /tests/test-bdrv-drain.c | |
parent | b69f777dd9ba992fdd35828a90eefcd88c0ec332 (diff) |
job: Move .complete callback to Job
This moves the .complete callback that tells a READY job to complete
from BlockJobDriver to JobDriver. The wrapper function job_complete()
doesn't require anything block job specific any more and can be moved
to Job.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/test-bdrv-drain.c')
-rw-r--r-- | tests/test-bdrv-drain.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c index 58ea5663f0..b428aaca68 100644 --- a/tests/test-bdrv-drain.c +++ b/tests/test-bdrv-drain.c @@ -514,9 +514,9 @@ static void coroutine_fn test_job_start(void *opaque) job_defer_to_main_loop(&s->common.job, test_job_completed, NULL); } -static void test_job_complete(BlockJob *job, Error **errp) +static void test_job_complete(Job *job, Error **errp) { - TestBlockJob *s = container_of(job, TestBlockJob, common); + TestBlockJob *s = container_of(job, TestBlockJob, common.job); s->should_complete = true; } @@ -527,8 +527,8 @@ BlockJobDriver test_job_driver = { .user_resume = block_job_user_resume, .drain = block_job_drain, .start = test_job_start, + .complete = test_job_complete, }, - .complete = test_job_complete, }; static void test_blockjob_common(enum drain_type drain_type) |