mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
job: Add job_dismiss()
This moves block_job_dismiss() to the Job layer. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
198c49cc8d
commit
5f9a6a08e8
6 changed files with 28 additions and 30 deletions
13
blockjob.c
13
blockjob.c
|
@ -242,19 +242,6 @@ int64_t block_job_ratelimit_get_delay(BlockJob *job, uint64_t n)
|
|||
return ratelimit_calculate_delay(&job->limit, n);
|
||||
}
|
||||
|
||||
void block_job_dismiss(BlockJob **jobptr, Error **errp)
|
||||
{
|
||||
BlockJob *job = *jobptr;
|
||||
/* similarly to _complete, this is QMP-interface only. */
|
||||
assert(job->job.id);
|
||||
if (job_apply_verb(&job->job, JOB_VERB_DISMISS, errp)) {
|
||||
return;
|
||||
}
|
||||
|
||||
job_do_dismiss(&job->job);
|
||||
*jobptr = NULL;
|
||||
}
|
||||
|
||||
void block_job_progress_update(BlockJob *job, uint64_t done)
|
||||
{
|
||||
job->offset += done;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue