From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv4XS-00041U-Na for qemu-devel@nongnu.org; Tue, 15 Jan 2013 06:18:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tv4XR-0001Au-MC for qemu-devel@nongnu.org; Tue, 15 Jan 2013 06:18:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv4XR-0001Ai-Ev for qemu-devel@nongnu.org; Tue, 15 Jan 2013 06:18:41 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0FBIesG023762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 15 Jan 2013 06:18:41 -0500 From: Juan Quintela Date: Tue, 15 Jan 2013 12:18:20 +0100 Message-Id: <1358248702-14278-13-git-send-email-quintela@redhat.com> In-Reply-To: <1358248702-14278-1-git-send-email-quintela@redhat.com> References: <1358248702-14278-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PATCH 12/14] migration: Only go to the iterate stage if there is anything to send List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Orit Wasserman Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela --- migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration.c b/migration.c index 6d3aeed..fe1a103 100644 --- a/migration.c +++ b/migration.c @@ -698,7 +698,7 @@ static void *buffered_file_thread(void *opaque) DPRINTF("iterate\n"); pending_size = qemu_savevm_state_pending(s->file, max_size); DPRINTF("pending size %lu max %lu\n", pending_size, max_size); - if (pending_size >= max_size) { + if (pending_size && pending_size >= max_size) { ret = qemu_savevm_state_iterate(s->file); if (ret < 0) { qemu_mutex_unlock_iothread(); -- 1.8.1