From patchwork Tue Jan 15 11:18:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 212108 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 86F0F2C0087 for ; Tue, 15 Jan 2013 22:19:06 +1100 (EST) Received: from localhost ([::1]:35637 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv4Xo-0004Jl-J3 for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2013 06:19:04 -0500 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 Received: from trasno.mitica (ovpn-113-25.phx2.redhat.com [10.3.113.25]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0FBIMrB005333; Tue, 15 Jan 2013 06:18:39 -0500 From: Juan Quintela To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Orit Wasserman Subject: [Qemu-devel] [PATCH 12/14] migration: Only go to the iterate stage if there is anything to send X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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();