Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/2] blockjob: do not cancel timer in resume

2018-05-14 Thread QingFeng Hao


在 2018/5/8 21:54, Stefan Hajnoczi 写道:
> Currently the timer is cancelled and the block job is entered by
> block_job_resume().  This behavior causes drain to run extra blockjob
> iterations when the job was sleeping due to the ratelimit.
> 
> This patch leaves the job asleep when block_job_resume() is called.
> Jobs can still be forcibly woken up using block_job_enter(), which is
> used to cancel jobs.
> 
> After this patch drain no longer runs extra blockjob iterations.  This
> is the expected behavior that qemu-iotests 185 used to rely on.  We
> temporarily changed the 185 test output to make it pass for the QEMU
> 2.12 release but now it's time to address this issue.
> 
Verified on s390x. Thx
Reviewed-by: QingFeng Hao 
> Cc: QingFeng Hao 
> Signed-off-by: Stefan Hajnoczi 
> ---
>  blockjob.c | 22 +++---
>  tests/qemu-iotests/185 |  5 +
>  tests/qemu-iotests/185.out | 12 +---
>  3 files changed, 21 insertions(+), 18 deletions(-)
> 

[...]
>  *** done
> 

-- 
Regards
QingFeng Hao




Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/2] blockjob: do not cancel timer in resume

2018-05-08 Thread Eric Blake

On 05/08/2018 08:54 AM, Stefan Hajnoczi wrote:

Currently the timer is cancelled and the block job is entered by
block_job_resume().  This behavior causes drain to run extra blockjob
iterations when the job was sleeping due to the ratelimit.

This patch leaves the job asleep when block_job_resume() is called.
Jobs can still be forcibly woken up using block_job_enter(), which is
used to cancel jobs.

After this patch drain no longer runs extra blockjob iterations.  This
is the expected behavior that qemu-iotests 185 used to rely on.  We
temporarily changed the 185 test output to make it pass for the QEMU
2.12 release but now it's time to address this issue.

Cc: QingFeng Hao 
Signed-off-by: Stefan Hajnoczi 
---
  blockjob.c | 22 +++---
  tests/qemu-iotests/185 |  5 +
  tests/qemu-iotests/185.out | 12 +---
  3 files changed, 21 insertions(+), 18 deletions(-)


Reviewed-by: Eric Blake 

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.   +1-919-301-3266
Virtualization:  qemu.org | libvirt.org