From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn72X-0002DE-MX for qemu-devel@nongnu.org; Tue, 28 Apr 2015 11:03:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yn72R-0002YQ-JQ for qemu-devel@nongnu.org; Tue, 28 Apr 2015 11:03:13 -0400 From: Kevin Wolf Date: Tue, 28 Apr 2015 17:00:52 +0200 Message-Id: <1430233258-31807-71-git-send-email-kwolf@redhat.com> In-Reply-To: <1430233258-31807-1-git-send-email-kwolf@redhat.com> References: <1430233258-31807-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 70/76] block/mirror: Always call block_job_sleep_ns() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: 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 Reviewed-by: Fam Zheng Reviewed-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- 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; - } } } -- 1.8.3.1