From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54837 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PryVQ-0006VR-RN for qemu-devel@nongnu.org; Tue, 22 Feb 2011 15:06:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PryVI-0007Ib-FU for qemu-devel@nongnu.org; Tue, 22 Feb 2011 15:06:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PryVI-0007Ht-60 for qemu-devel@nongnu.org; Tue, 22 Feb 2011 15:06:36 -0500 Message-Id: <20110222170115.762483303@redhat.com> Date: Tue, 22 Feb 2011 14:00:07 -0300 From: Marcelo Tosatti References: <20110222170004.808373778@redhat.com> Content-Disposition: inline; filename=3-3-do-not-allow-migration-if-block-copy-in-progress.patch Subject: [Qemu-devel] [patch 3/3] do not allow migration if block copy in progress List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jes.Sorensen@redhat.com, Marcelo Tosatti , avi@redhat.com Signed-off-by: Marcelo Tosatti Index: qemu/migration.c =================================================================== --- qemu.orig/migration.c +++ qemu/migration.c @@ -19,6 +19,7 @@ #include "block.h" #include "qemu_socket.h" #include "block-migration.h" +#include "block-copy.h" #include "qemu-objects.h" //#define DEBUG_MIGRATION @@ -95,6 +96,11 @@ int do_migrate(Monitor *mon, const QDict return -1; } + if (block_copy_active()) { + monitor_printf(mon, "block copy in progress\n"); + return -1; + } + if (strstart(uri, "tcp:", &p)) { s = tcp_start_outgoing_migration(mon, p, max_throttle, detach, blk, inc);