diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-04-13 17:31:02 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-05-23 14:30:50 +0200 |
commit | da01ff7f38f52791f93fc3ca59afcfbb220f15af (patch) | |
tree | 74010498c6229085ce3f2cc2184168aec5fb99f8 /include/block/blockjob_int.h | |
parent | 1908a5590c7d214b1b6886bc19b81076fb65cec9 (diff) |
job: Move coroutine and related code to Job
This commit moves some core functions for dealing with the job coroutine
from BlockJob to Job. This includes primarily entering the coroutine
(both for the first and reentering) and yielding explicitly and at pause
points.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'include/block/blockjob_int.h')
-rw-r--r-- | include/block/blockjob_int.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index 0c2f8de381..0a614a89b8 100644 --- a/include/block/blockjob_int.h +++ b/include/block/blockjob_int.h @@ -38,9 +38,6 @@ struct BlockJobDriver { /** Generic JobDriver callbacks and settings */ JobDriver job_driver; - /** Mandatory: Entrypoint for the Coroutine. */ - CoroutineEntry *start; - /** * Optional callback for job types whose completion must be triggered * manually. @@ -85,20 +82,6 @@ struct BlockJobDriver { */ void (*clean)(BlockJob *job); - /** - * If the callback is not NULL, it will be invoked when the job transitions - * into the paused state. Paused jobs must not perform any asynchronous - * I/O or event loop activity. This callback is used to quiesce jobs. - */ - void coroutine_fn (*pause)(BlockJob *job); - - /** - * If the callback is not NULL, it will be invoked when the job transitions - * out of the paused state. Any asynchronous I/O or event loop activity - * should be restarted from this callback. - */ - void coroutine_fn (*resume)(BlockJob *job); - /* * If the callback is not NULL, it will be invoked before the job is * resumed in a new AioContext. This is the place to move any resources @@ -196,15 +179,6 @@ void block_job_early_fail(BlockJob *job); void block_job_completed(BlockJob *job, int ret); /** - * block_job_pause_point: - * @job: The job that is ready to pause. - * - * Pause now if block_job_pause() has been called. Block jobs that perform - * lots of I/O must call this between requests so that the job can be paused. - */ -void coroutine_fn block_job_pause_point(BlockJob *job); - -/** * block_job_enter: * @job: The job to enter. * |