OSDN Git Service

block/mirror: Always call block_job_sleep_ns()
authorMax Reitz <mreitz@redhat.com>
Mon, 27 Apr 2015 11:07:31 +0000 (13:07 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 28 Apr 2015 13:36:11 +0000 (15:36 +0200)
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>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/mirror.c

index d53e60e..58f391a 100644 (file)
@@ -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;
-                }
             }
         }