mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
job: Add job_sleep_ns()
There is nothing block layer specific about block_job_sleep_ns(), so move the function to Job. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
da01ff7f38
commit
5d43e86e11
11 changed files with 61 additions and 50 deletions
|
@ -338,7 +338,7 @@ static bool coroutine_fn yield_and_check(BackupBlockJob *job)
|
|||
* return. Without a yield, the VM would not reboot. */
|
||||
delay_ns = block_job_ratelimit_get_delay(&job->common, job->bytes_read);
|
||||
job->bytes_read = 0;
|
||||
block_job_sleep_ns(&job->common, delay_ns);
|
||||
job_sleep_ns(&job->common.job, delay_ns);
|
||||
|
||||
if (job_is_cancelled(&job->common.job)) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue