From nobody Mon Feb 9 08:57:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623141422; cv=none; d=zohomail.com; s=zohoarc; b=OAekdb9qoEJWwUIQJ8AmJfqz7nOEcpLRrsB6hJ3NZoDQxjjz0huVd5rhw6q2Yl4fr2jkQ+qw/1k86u681v2N4kqkwYRurazSWdB419Uaj+oq8H7Ql0hvq4t0MpmoSTNfH9wZyLFEBYddt3TuO/8WzIXqvgOqAy8x8aBlndgvnnw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623141422; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mcEUk/DqggZE/fnRzIRZaKm0vAl3NmHibbKa2VSUko4=; b=X4kNHnQ4UP3NPqignlV5PKxO5131vF4JpahfBfb26mOXpWyufRwsYVL0h5K00UfQC769xdP/eRiL5cHCRRbYjo5n0VhzQi/GscSg42xX4zbpZXUnTnTEG4z3oL/ZaOh+3SYESZpvwUiJ9TS3lmII6g/NOyGD1yC/TRYbzogmxqg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623141422884256.993738201033; Tue, 8 Jun 2021 01:37:02 -0700 (PDT) Received: from localhost ([::1]:39100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqXEL-0004mv-MH for importer@patchew.org; Tue, 08 Jun 2021 04:37:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqX8R-0003sK-6k for qemu-devel@nongnu.org; Tue, 08 Jun 2021 04:30:59 -0400 Received: from mga14.intel.com ([192.55.52.115]:24323) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqX8P-0000Fj-5u for qemu-devel@nongnu.org; Tue, 08 Jun 2021 04:30:54 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 01:30:48 -0700 Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 01:30:46 -0700 IronPort-SDR: SzIKaCG/iVE5W1hlGtMz3CITxSaBQKCDlX7ayxHZr3Sqvmr/5vz0ZRZ8/thBlYrrMr/WuGo30k eqxGR/0EEn+A== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="204614532" X-IronPort-AV: E=Sophos;i="5.83,257,1616482800"; d="scan'208";a="204614532" IronPort-SDR: LQi1dH16Ksl2bRyglsTwj2+QGIBDLu6iARlKU6Ky3hYGmRiJZNh60W0jPqWs3HeTMr8mWkiyua z9sDFEqsc74w== X-IronPort-AV: E=Sophos;i="5.83,257,1616482800"; d="scan'208";a="481862931" From: Zhang Chen To: Jason Wang , qemu-dev Subject: [PATCH 4/7] Remove migrate_set_block_enabled in checkpoint Date: Tue, 8 Jun 2021 16:23:28 +0800 Message-Id: <20210608082331.1949117-5-chen.zhang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210608082331.1949117-1-chen.zhang@intel.com> References: <20210608082331.1949117-1-chen.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.55.52.115; envelope-from=chen.zhang@intel.com; helo=mga14.intel.com X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lukas Straub , Li Zhijian , "Rao, Lei" , Li Zhijian , Zhang Chen , Zhang Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: "Rao, Lei" We can detect disk migration in migrate_prepare, if disk migration is enabled in COLO mode, we can directly report an error.and there is no need to disable block migration at every checkpoint. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen Reviewed-by: Li Zhijian Reviewed-by: Zhang Chen Reviewed-by: Lukas Straub Tested-by: Lukas Straub --- migration/colo.c | 6 ------ migration/migration.c | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index e498fdb125..79fa1f6619 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -435,12 +435,6 @@ static int colo_do_checkpoint_transaction(MigrationSta= te *s, if (failover_get_state() !=3D FAILOVER_STATUS_NONE) { goto out; } - - /* Disable block migration */ - migrate_set_block_enabled(false, &local_err); - if (local_err) { - goto out; - } qemu_mutex_lock_iothread(); =20 #ifdef CONFIG_REPLICATION diff --git a/migration/migration.c b/migration/migration.c index 1885860d7b..d059cf70b9 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2214,6 +2214,10 @@ static bool migrate_prepare(MigrationState *s, bool = blk, bool blk_inc, } =20 if (blk || blk_inc) { + if (migrate_colo_enabled()) { + error_setg(errp, "No disk migration is required in COLO mode"); + return false; + } if (migrate_use_block() || migrate_use_block_incremental()) { error_setg(errp, "Command options are incompatible with " "current migration capabilities"); --=20 2.25.1