qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [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

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).