* [Qemu-devel] [PATCH] block/mirror: Always call block_job_sleep_ns()
@ 2015-04-27 11:07 Max Reitz
2015-04-27 13:00 ` Paolo Bonzini
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Max Reitz @ 2015-04-27 11:07 UTC (permalink / raw)
To: qemu-block; +Cc: Kevin Wolf, Fam Zheng, qemu-devel, Stefan Hajnoczi, Max Reitz
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 <mreitz@redhat.com>
---
This makes test 129 pass when run in tmpfs (for me, at least).
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] block/mirror: Always call block_job_sleep_ns()
2015-04-27 11:07 [Qemu-devel] [PATCH] block/mirror: Always call block_job_sleep_ns() Max Reitz
@ 2015-04-27 13:00 ` Paolo Bonzini
2015-04-27 13:08 ` Fam Zheng
2015-04-27 15:25 ` Kevin Wolf
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2015-04-27 13:00 UTC (permalink / raw)
To: Max Reitz, qemu-block; +Cc: Fam Zheng, qemu-devel, Stefan Hajnoczi
On 27/04/2015 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 <mreitz@redhat.com>
> ---
> This makes test 129 pass when run in tmpfs (for me, at least).
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] block/mirror: Always call block_job_sleep_ns()
2015-04-27 11:07 [Qemu-devel] [PATCH] block/mirror: Always call block_job_sleep_ns() Max Reitz
2015-04-27 13:00 ` Paolo Bonzini
@ 2015-04-27 13:08 ` Fam Zheng
2015-04-27 15:25 ` Kevin Wolf
2 siblings, 0 replies; 4+ messages in thread
From: Fam Zheng @ 2015-04-27 13:08 UTC (permalink / raw)
To: Max Reitz; +Cc: Kevin Wolf, Stefan Hajnoczi, qemu-devel, qemu-block
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 <mreitz@redhat.com>
> ---
> 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 <famz@redhat.com>
> ---
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] block/mirror: Always call block_job_sleep_ns()
2015-04-27 11:07 [Qemu-devel] [PATCH] block/mirror: Always call block_job_sleep_ns() Max Reitz
2015-04-27 13:00 ` Paolo Bonzini
2015-04-27 13:08 ` Fam Zheng
@ 2015-04-27 15:25 ` Kevin Wolf
2 siblings, 0 replies; 4+ messages in thread
From: Kevin Wolf @ 2015-04-27 15:25 UTC (permalink / raw)
To: Max Reitz; +Cc: Stefan Hajnoczi, Fam Zheng, qemu-devel, qemu-block
Am 27.04.2015 um 13:07 hat Max Reitz geschrieben:
> 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 <mreitz@redhat.com>
> ---
> This makes test 129 pass when run in tmpfs (for me, at least).
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-27 15:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-27 11:07 [Qemu-devel] [PATCH] block/mirror: Always call block_job_sleep_ns() Max Reitz
2015-04-27 13:00 ` Paolo Bonzini
2015-04-27 13:08 ` Fam Zheng
2015-04-27 15:25 ` Kevin Wolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).