[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH] block/mirror: Always call block_job_sleep_ns()
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [PATCH] block/mirror: Always call block_job_sleep_ns() |
Date: |
Mon, 27 Apr 2015 21:08:29 +0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, 04/27 13:07, Max Reitz wrote:
> The mirror block job is trying to take a clever shortcut if delay_ns is
> 0 and skips block_job_sleep_ns() in that case. But that function must be
> called in every block job iteration, because otherwise it is for example
> impossible to pause the job.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> This makes test 129 pass when run in tmpfs (for me, at least).
Looks good to me. Thanks for debugging the failure!
Reviewed-by: Fam Zheng <address@hidden>
> ---
> block/mirror.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/block/mirror.c b/block/mirror.c
> index d53e60e..58f391a 100644
> --- a/block/mirror.c
> +++ b/block/mirror.c
> @@ -482,9 +482,6 @@ static void coroutine_fn mirror_run(void *opaque)
> continue;
> } else if (cnt != 0) {
> delay_ns = mirror_iteration(s);
> - if (delay_ns == 0) {
> - continue;
> - }
> }
> }
>
> --
> 2.3.5
>