mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
job: Add job_transition_to_ready()
The transition to the READY state was still performed in the BlockJob layer, in the same function that sent the BLOCK_JOB_READY QMP event. This patch brings the state transition to the Job layer and implements the QMP event using a notifier called from the Job layer, like we already do for other events related to state transitions. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
df956ae201
commit
2e1795b581
8 changed files with 45 additions and 34 deletions
|
@ -186,7 +186,7 @@ static void coroutine_fn cancel_job_start(void *opaque)
|
|||
}
|
||||
|
||||
if (!job_is_ready(&s->common.job) && s->should_converge) {
|
||||
block_job_event_ready(&s->common);
|
||||
job_transition_to_ready(&s->common.job);
|
||||
}
|
||||
|
||||
job_sleep_ns(&s->common.job, 100000);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue