From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Paris Subject: [PATCH 2/3] qemu: don't start a new migration if one is already in progress Date: Wed, 8 Aug 2007 16:22:48 -0400 Message-ID: <1186604569652-git-send-email-jim@jtan.com> References: 46B9896D.3030506@qumranet.com <1186604569626-git-send-email-jim@jtan.com> <11866045692122-git-send-email-jim@jtan.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Jim Paris To: Uri Lublin , kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: In-Reply-To: <11866045692122-git-send-email-jim-XrPbb/hENzg@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Signed-off-by: Jim Paris --- Having two migrations run simultaneously was causing my crashes. The command was sent twice because of a bug in the readline routines, but adding a check here as well seems like a good idea. qemu/migration.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/qemu/migration.c b/qemu/migration.c index 4d7aa01..96b0c2f 100644 --- a/qemu/migration.c +++ b/qemu/migration.c @@ -973,6 +973,12 @@ int migrate_incoming(const char *device) void do_migrate(int detach, const char *uri) { const char *ptr; + MigrationState *s = current_migration; + + if (s) { + term_printf("Migration already active\n"); + return; + } status = MIG_STAT_INVALID_PARAMS; if (strstart(uri, "exec:", &ptr)) { -- 1.5.3.GIT ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/