From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOkZc-00065Z-Qn for qemu-devel@nongnu.org; Thu, 18 Oct 2012 03:31:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOkZY-0000j9-Pr for qemu-devel@nongnu.org; Thu, 18 Oct 2012 03:31:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOkZY-0000j3-Hx for qemu-devel@nongnu.org; Thu, 18 Oct 2012 03:31:16 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9I7VFMp029532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Oct 2012 03:31:16 -0400 From: Juan Quintela Date: Thu, 18 Oct 2012 09:30:25 +0200 Message-Id: <1350545426-23172-30-git-send-email-quintela@redhat.com> In-Reply-To: <1350545426-23172-1-git-send-email-quintela@redhat.com> References: <1350545426-23172-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PATCH 29/30] 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 3856a99..554d79a 100644 --- a/migration.c +++ b/migration.c @@ -684,7 +684,7 @@ static void *buffered_file_thread(void *opaque) DPRINTF("iterate\n"); pending_size = qemu_savevm_state_pending(m->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(m->file); if (ret < 0) { qemu_mutex_unlock_iothread(); -- 1.7.11.7