diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-04-24 16:13:52 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-05-23 14:30:51 +0200 |
commit | 3d70ff53b6bf90d9eec6f97024ec9895f6799d9e (patch) | |
tree | 947adf7d4422c78235ff4b8f2a31fac0085efc9a /include/block | |
parent | 7eaa8fb57da96301f4a8ce176ad503f80efc7cc0 (diff) |
job: Move completion and cancellation to Job
This moves the top-level job completion and cancellation functions from
BlockJob to Job.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/blockjob.h | 55 | ||||
-rw-r--r-- | include/block/blockjob_int.h | 18 |
2 files changed, 0 insertions, 73 deletions
diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 09e6bb42bf..e9ed7b8b78 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -141,15 +141,6 @@ void block_job_remove_all_bdrv(BlockJob *job); void block_job_set_speed(BlockJob *job, int64_t speed, Error **errp); /** - * block_job_cancel: - * @job: The job to be canceled. - * @force: Quit a job without waiting for data to be in sync. - * - * Asynchronously cancel the specified job. - */ -void block_job_cancel(BlockJob *job, bool force); - -/** * block_job_dismiss: * @job: The job to be dismissed. * @errp: Error object. @@ -186,52 +177,6 @@ void block_job_progress_set_remaining(BlockJob *job, uint64_t remaining); BlockJobInfo *block_job_query(BlockJob *job, Error **errp); /** - * block_job_user_cancel: - * @job: The job to be cancelled. - * @force: Quit a job without waiting for data to be in sync. - * - * Cancels the specified job, but may refuse to do so if the - * operation isn't currently meaningful. - */ -void block_job_user_cancel(BlockJob *job, bool force, Error **errp); - -/** - * block_job_cancel_sync: - * @job: The job to be canceled. - * - * Synchronously cancel the job. The completion callback is called - * before the function returns. The job may actually complete - * instead of canceling itself; the circumstances under which this - * happens depend on the kind of job that is active. - * - * Returns the return value from the job if the job actually completed - * during the call, or -ECANCELED if it was canceled. - */ -int block_job_cancel_sync(BlockJob *job); - -/** - * block_job_cancel_sync_all: - * - * Synchronously cancels all jobs using block_job_cancel_sync(). - */ -void block_job_cancel_sync_all(void); - -/** - * block_job_complete_sync: - * @job: The job to be completed. - * @errp: Error object which may be set by block_job_complete(); this is not - * necessarily set on every error, the job return value has to be - * checked as well. - * - * Synchronously complete the job. The completion callback is called before the - * function returns, unless it is NULL (which is permissible when using this - * function). - * - * Returns the return value from the job. - */ -int block_job_complete_sync(BlockJob *job, Error **errp); - -/** * block_job_iostatus_reset: * @job: The job whose I/O status should be reset. * diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index 29a28020ac..7df07b20cf 100644 --- a/include/block/blockjob_int.h +++ b/include/block/blockjob_int.h @@ -124,24 +124,6 @@ void block_job_yield(BlockJob *job); int64_t block_job_ratelimit_get_delay(BlockJob *job, uint64_t n); /** - * block_job_completed: - * @job: The job being completed. - * @ret: The status code. - * - * Call the completion function that was registered at creation time, and - * free @job. - */ -void block_job_completed(BlockJob *job, int ret); - -/** - * block_job_enter: - * @job: The job to enter. - * - * Continue the specified job by entering the coroutine. - */ -void block_job_enter(BlockJob *job); - -/** * block_job_event_ready: * @job: The job which is now ready to be completed. * |