From patchwork Wed Nov 21 13:04:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 1001141 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 430NBV2Q3qz9s1x for ; Thu, 22 Nov 2018 00:06:42 +1100 (AEDT) Received: from localhost ([::1]:39098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPSDH-0000WK-Lx for incoming@patchwork.ozlabs.org; Wed, 21 Nov 2018 08:06:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPSC1-0008RX-BQ for qemu-devel@nongnu.org; Wed, 21 Nov 2018 08:05:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPSBv-0006eC-Jp for qemu-devel@nongnu.org; Wed, 21 Nov 2018 08:05:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41116) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gPSBn-0006Mb-AU for qemu-devel@nongnu.org; Wed, 21 Nov 2018 08:05:12 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9FA347F6B2; Wed, 21 Nov 2018 13:05:04 +0000 (UTC) Received: from dgilbert-t530.redhat.com (unknown [10.36.118.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 66A1927BBD; Wed, 21 Nov 2018 13:05:03 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, chen.zhang@intel.com, zhangckid@gmail.com, quintela@redhat.com Date: Wed, 21 Nov 2018 13:04:56 +0000 Message-Id: <20181121130456.35661-3-dgilbert@redhat.com> In-Reply-To: <20181121130456.35661-1-dgilbert@redhat.com> References: <20181121130456.35661-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 21 Nov 2018 13:05:04 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/2] migration/migration.c: Add COLO dependency checks X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peterx@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Zhang Chen Current COLO mode(independent disk mode) need replication module work together. Suggested by Dr. David Alan Gilbert . Signed-off-by: Zhang Chen Message-Id: <20181114190912.7242-1-chen.zhang@intel.com> Reviewed-by: Peter Xu Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index b261c1e4ce..49ffb9997a 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -918,6 +918,15 @@ static bool migrate_caps_check(bool *cap_list, } #endif +#ifndef CONFIG_REPLICATION + if (cap_list[MIGRATION_CAPABILITY_X_COLO]) { + error_setg(errp, "QEMU compiled without replication module" + " can't enable COLO"); + error_append_hint(errp, "Please enable replication before COLO.\n"); + return false; + } +#endif + if (cap_list[MIGRATION_CAPABILITY_POSTCOPY_RAM]) { if (cap_list[MIGRATION_CAPABILITY_COMPRESS]) { /* The decompression threads asynchronously write into RAM