From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49150 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTIvN-0007Up-Up for qemu-devel@nongnu.org; Thu, 16 Dec 2010 13:51:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTIvM-0008Pk-UH for qemu-devel@nongnu.org; Thu, 16 Dec 2010 13:51:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTIvM-0008PZ-M1 for qemu-devel@nongnu.org; Thu, 16 Dec 2010 13:51:32 -0500 Message-Id: <20101216174810.740347376@redhat.com> Date: Thu, 16 Dec 2010 15:44:22 -0200 From: Marcelo Tosatti References: <20101216174419.090204390@redhat.com> Content-Disposition: inline; filename=blockcopy-active 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: Kevin Wolf , Anthony Liguori , Marcelo Tosatti Signed-off-by: Marcelo Tosatti Index: qemu-kvm-block-copy/migration.c =================================================================== --- qemu-kvm-block-copy.orig/migration.c +++ qemu-kvm-block-copy/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 @@ -88,6 +89,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);