From patchwork Thu May 9 03:31:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhijian Li (Fujitsu)" X-Patchwork-Id: 13659406 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 557CAC25B10 for ; Thu, 9 May 2024 03:29:03 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4uRl-0003ct-Bi; Wed, 08 May 2024 23:27:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4uRj-0003c2-LX for qemu-devel@nongnu.org; Wed, 08 May 2024 23:27:51 -0400 Received: from esa8.hc1455-7.c3s2.iphmx.com ([139.138.61.253]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4uRh-00045y-4J for qemu-devel@nongnu.org; Wed, 08 May 2024 23:27:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj2; t=1715225269; x=1746761269; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=V+2KLvDv9pwq0N0vM09uKZi6Z3QabzNKsE0t4w071Vk=; b=UBjWalaK0A8aJ5aI1Lkgxe9A8YHZLM40rJr3kh3xe8M+Ya1oQO92nkmD tmRGGbsx/wo56B24kke4fK2iE8Xs5RTwyQP02GFjEzBRUo9SNIxO+eD/P 4bq6+zMj1scNCMlJRpYdzVOT8YSws/2yWuJK88a1HdSWbp9yV2x8Feq3x bVZLcWLhp4FXz6OpVB5nf+xSZXQD8psT5H4ZrSOEC/fm0SMvoy209W2fw dpoPL7XDYJ3zHKZP9dA+HaSoK7bdsRpFeYjvAdZMVAa2AtYxCRYURRv2Q jedxhN2AFvoL2BtUlTlvcKQyTLiJECaU8z0rC05HW4crILIsWEKFnpa3C A==; X-IronPort-AV: E=McAfee;i="6600,9927,11067"; a="145716358" X-IronPort-AV: E=Sophos;i="6.08,146,1712588400"; d="scan'208";a="145716358" Received: from unknown (HELO yto-r2.gw.nic.fujitsu.com) ([218.44.52.218]) by esa8.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2024 12:27:43 +0900 Received: from yto-m1.gw.nic.fujitsu.com (yto-nat-yto-m1.gw.nic.fujitsu.com [192.168.83.64]) by yto-r2.gw.nic.fujitsu.com (Postfix) with ESMTP id 47F84C6905 for ; Thu, 9 May 2024 12:27:41 +0900 (JST) Received: from kws-ab3.gw.nic.fujitsu.com (kws-ab3.gw.nic.fujitsu.com [192.51.206.21]) by yto-m1.gw.nic.fujitsu.com (Postfix) with ESMTP id 836BF12ED79 for ; Thu, 9 May 2024 12:27:40 +0900 (JST) Received: from edo.cn.fujitsu.com (edo.cn.fujitsu.com [10.167.33.5]) by kws-ab3.gw.nic.fujitsu.com (Postfix) with ESMTP id EB6B42009327E for ; Thu, 9 May 2024 12:27:39 +0900 (JST) Received: from localhost.localdomain (unknown [10.167.226.45]) by edo.cn.fujitsu.com (Postfix) with ESMTP id 09A3F1A0002; Thu, 9 May 2024 11:27:38 +0800 (CST) To: Peter Xu , Fabiano Rosas Cc: Hailiang Zhang , qemu-devel@nongnu.org, Zhang Chen , Li Zhijian Subject: [PATCH 1/3] migration/colo: Minor fix for colo error message Date: Thu, 9 May 2024 11:31:04 +0800 Message-Id: <20240509033106.1321880-1-lizhijian@fujitsu.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSS-9.1.0.1417-9.0.0.1002-28372.002 X-TM-AS-User-Approved-Sender: Yes X-TMASE-Version: IMSS-9.1.0.1417-9.0.1002-28372.002 X-TMASE-Result: 10-1.852500-10.000000 X-TMASE-MatchedRID: r52rw5mZIl/a0OexaGjzmk7nLUqYrlslFIuBIWrdOeMiB3Nk/d/KP9Mv z+IPE7DW7hkjCJvdG+GFlygKFYYohzcpdZ3fQiLdFEUknJ/kEl6YwzE9E8g5OfoLR4+zsDTtF/a 6QWbgQ20w9Tcsf0lwWRjfnFEtGkerg5AmD1NbZsNAWJgUvcuLccO36joBbyZeZqlPjeT2ZU5Zzo rPpYG7KZ1Cla4Jc50r1JscoP4eslSGk+xUaqdMDwHEKwHwYevbwUSxXh+jiUgkww/gwY7hMA== X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 Received-SPF: pass client-ip=139.138.61.253; envelope-from=lizhijian@fujitsu.com; helo=esa8.hc1455-7.c3s2.iphmx.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Li Zhijian X-Patchwork-Original-From: Li Zhijian via From: "Zhijian Li (Fujitsu)" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org - Explicitly show the missing module name: replication - Fix capability name to x-colo Signed-off-by: Li Zhijian Reviewed-by: Peter Xu Reviewed-by: Zhang Chen --- migration/migration.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 6502e169a3..b4a09c561c 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -517,13 +517,13 @@ void migration_incoming_disable_colo(void) int migration_incoming_enable_colo(void) { #ifndef CONFIG_REPLICATION - error_report("ENABLE_COLO command come in migration stream, but COLO " - "module is not built in"); + error_report("ENABLE_COLO command come in migration stream, but the " + "replication module is not built in"); return -ENOTSUP; #endif if (!migrate_colo()) { - error_report("ENABLE_COLO command come in migration stream, but c-colo " + error_report("ENABLE_COLO command come in migration stream, but x-colo " "capability is not set"); return -EINVAL; } From patchwork Thu May 9 03:31:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhijian Li (Fujitsu)" X-Patchwork-Id: 13659404 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F10EC41513 for ; Thu, 9 May 2024 03:29:03 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4uRl-0003cs-DK; Wed, 08 May 2024 23:27:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4uRj-0003bz-0E for qemu-devel@nongnu.org; Wed, 08 May 2024 23:27:51 -0400 Received: from esa4.hc1455-7.c3s2.iphmx.com ([68.232.139.117]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4uRh-00045x-7X for qemu-devel@nongnu.org; Wed, 08 May 2024 23:27:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj2; t=1715225269; x=1746761269; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cyF0sig8Swsz9tk18ZpIx7U0Oapo1ebsJLo4It/k2PM=; b=svd0MuYXkTbnqEu3yuMJN9Hk1ql2cwULnl4ZwnAIXqMetSkVfMUhkR70 OPT7LGWr6adX28FbKDK7KwAIaLsHclwBGXXM9fBzvXWtcP/GEwWQuIkqp 6LLW4pUD835hgDE3VH9e3hkqLbKVH1MSVfpGvxK2kZhMc9jX5KKewiW2P sGrLBkY374REuTPLf2qrmyDXK2NrIU34uYTvvFaWzOsXaRLPkNNLClXtb ZURdbc/mV5MUR6E7rWxQqmzVcxuE1u053UBU8YHte+XkuoqI4wkLuI7Rt 8qRUKMIE9P9vhAhyFKfk0UPYUBTZ/S4WlY0Xk79BBmuGEbZmAo39FuDSY g==; X-IronPort-AV: E=McAfee;i="6600,9927,11067"; a="158023995" X-IronPort-AV: E=Sophos;i="6.08,146,1712588400"; d="scan'208";a="158023995" Received: from unknown (HELO oym-r3.gw.nic.fujitsu.com) ([210.162.30.91]) by esa4.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2024 12:27:43 +0900 Received: from oym-m3.gw.nic.fujitsu.com (oym-nat-oym-m3.gw.nic.fujitsu.com [192.168.87.60]) by oym-r3.gw.nic.fujitsu.com (Postfix) with ESMTP id 72A61D64BE for ; Thu, 9 May 2024 12:27:41 +0900 (JST) Received: from kws-ab3.gw.nic.fujitsu.com (kws-ab3.gw.nic.fujitsu.com [192.51.206.21]) by oym-m3.gw.nic.fujitsu.com (Postfix) with ESMTP id 93F24D949A for ; Thu, 9 May 2024 12:27:40 +0900 (JST) Received: from edo.cn.fujitsu.com (edo.cn.fujitsu.com [10.167.33.5]) by kws-ab3.gw.nic.fujitsu.com (Postfix) with ESMTP id 254F420097CE6 for ; Thu, 9 May 2024 12:27:40 +0900 (JST) Received: from localhost.localdomain (unknown [10.167.226.45]) by edo.cn.fujitsu.com (Postfix) with ESMTP id A0BEB1A000C; Thu, 9 May 2024 11:27:39 +0800 (CST) To: Peter Xu , Fabiano Rosas Cc: Hailiang Zhang , qemu-devel@nongnu.org, Zhang Chen , Li Zhijian Subject: [PATCH 2/3] migration/colo: make colo_incoming_co() return void Date: Thu, 9 May 2024 11:31:05 +0800 Message-Id: <20240509033106.1321880-2-lizhijian@fujitsu.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240509033106.1321880-1-lizhijian@fujitsu.com> References: <20240509033106.1321880-1-lizhijian@fujitsu.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSS-9.1.0.1417-9.0.0.1002-28372.002 X-TM-AS-User-Approved-Sender: Yes X-TMASE-Version: IMSS-9.1.0.1417-9.0.1002-28372.002 X-TMASE-Result: 10-5.088600-10.000000 X-TMASE-MatchedRID: PoiqctUOquXxTNB2h2oY6UhwlOfYeSqx+f2tDgd++7AgUEQTkIWiYgGU wLdEyRc22X3YOaN7LRO12HagvbwDji/7QU2czuUNA9lly13c/gEG9HFKXsmjKdzuSrL7Eh5g04H opDMC5OEQhc6ZJs+yuR3kdXUuScbhAtMbsAHP2bW6kMgL3jbYOpki3iIBA3o/fsZmhE+Kc5OjxY yRBa/qJShNCXvA0fw+jaPj0W1qn0SyO81X3yak8/T+wXTQtc97goABUJDPefkZJp7h9xtibCdDv GW+2ibN1wiZLuOix9K93y+RUCO33tJMWudUVp1YlKRAAhLJCbWCUjmmAAZaIQ== X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 Received-SPF: pass client-ip=68.232.139.117; envelope-from=lizhijian@fujitsu.com; helo=esa4.hc1455-7.c3s2.iphmx.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Li Zhijian X-Patchwork-Original-From: Li Zhijian via From: "Zhijian Li (Fujitsu)" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Currently, it always returns 0, no need to check the return value at all. In addition, enter colo coroutine only if migration_incoming_colo_enabled() is true. Once the destination side enters the COLO* state, the COLO process will take over the remaining processes until COLO exits. Signed-off-by: Li Zhijian Reviewed-by: Peter Xu Reviewed-by: Zhang Chen --- migration/colo.c | 9 ++------- migration/migration.c | 6 +++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index 5600a43d78..991806c06a 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -929,16 +929,13 @@ out: return NULL; } -int coroutine_fn colo_incoming_co(void) +void coroutine_fn colo_incoming_co(void) { MigrationIncomingState *mis = migration_incoming_get_current(); QemuThread th; assert(bql_locked()); - - if (!migration_incoming_colo_enabled()) { - return 0; - } + assert(migration_incoming_colo_enabled()); qemu_thread_create(&th, "COLO incoming", colo_process_incoming_thread, mis, QEMU_THREAD_JOINABLE); @@ -954,6 +951,4 @@ int coroutine_fn colo_incoming_co(void) /* We hold the global BQL, so it is safe here */ colo_release_ram_cache(); - - return 0; } diff --git a/migration/migration.c b/migration/migration.c index b4a09c561c..6dc1f3bab4 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -789,9 +789,9 @@ process_incoming_migration_co(void *opaque) goto fail; } - if (colo_incoming_co() < 0) { - error_setg(&local_err, "colo incoming failed"); - goto fail; + if (migration_incoming_colo_enabled()) { + /* yield until COLO exit */ + colo_incoming_co(); } migration_bh_schedule(process_incoming_migration_bh, mis); From patchwork Thu May 9 03:31:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhijian Li (Fujitsu)" X-Patchwork-Id: 13659405 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D3BFC10F1A for ; Thu, 9 May 2024 03:29:03 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4uRl-0003cu-RD; Wed, 08 May 2024 23:27:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4uRk-0003cG-7x for qemu-devel@nongnu.org; Wed, 08 May 2024 23:27:52 -0400 Received: from esa5.hc1455-7.c3s2.iphmx.com ([68.232.139.130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4uRh-000463-4H for qemu-devel@nongnu.org; Wed, 08 May 2024 23:27:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj2; t=1715225267; x=1746761267; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GVmhNWvYuMl+TRo5ZwhycrsRqLYEmLmpGwmGYuDtGvM=; b=jJ0h6GwR0BkFSVpgGrNAL59Lu7qRvlLh0OpwvUJZL5hHUHSe2AmIwtwE puUdr1KiBKDmYJ59AfFnWAcjyJ+9GhkyvvODgeHecQ4/y4STOYKSi9f4K KGiCrH6Vjj8s3h9YQxA7Re4mMPYS6xTEGU4OQkg2L5BFzz5TXfV9aTC0r 9hY6j6SaHbVGVelIjz7TZpejMnnWb+gCUvYNZl/GoGJCPiw+Uovk65+Uc oQiovGIPgy++UN5tYS2bxoLqtDRINFF+5gdUcCEAFlLkwaLWv+0yfUWyI JdV+4phj2+4QCqixU0g2F50Qif/vIiDhaBQWOBn3LUStg+0q5On8PxJWv g==; X-IronPort-AV: E=McAfee;i="6600,9927,11067"; a="157165426" X-IronPort-AV: E=Sophos;i="6.08,146,1712588400"; d="scan'208";a="157165426" Received: from unknown (HELO oym-r1.gw.nic.fujitsu.com) ([210.162.30.89]) by esa5.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2024 12:27:42 +0900 Received: from oym-m2.gw.nic.fujitsu.com (oym-nat-oym-m2.gw.nic.fujitsu.com [192.168.87.59]) by oym-r1.gw.nic.fujitsu.com (Postfix) with ESMTP id BF6C4E8E1C for ; Thu, 9 May 2024 12:27:41 +0900 (JST) Received: from kws-ab4.gw.nic.fujitsu.com (kws-ab4.gw.nic.fujitsu.com [192.51.206.22]) by oym-m2.gw.nic.fujitsu.com (Postfix) with ESMTP id F2D7CBDB6A for ; Thu, 9 May 2024 12:27:40 +0900 (JST) Received: from edo.cn.fujitsu.com (edo.cn.fujitsu.com [10.167.33.5]) by kws-ab4.gw.nic.fujitsu.com (Postfix) with ESMTP id 8A5262C666F for ; Thu, 9 May 2024 12:27:40 +0900 (JST) Received: from localhost.localdomain (unknown [10.167.226.45]) by edo.cn.fujitsu.com (Postfix) with ESMTP id E98651A000D; Thu, 9 May 2024 11:27:39 +0800 (CST) To: Peter Xu , Fabiano Rosas Cc: Hailiang Zhang , qemu-devel@nongnu.org, Zhang Chen , Li Zhijian , Michael Tokarev Subject: [PATCH 3/3] migration/colo: Tidy up bql_unlock() around bdrv_activate_all() Date: Thu, 9 May 2024 11:31:06 +0800 Message-Id: <20240509033106.1321880-3-lizhijian@fujitsu.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240509033106.1321880-1-lizhijian@fujitsu.com> References: <20240509033106.1321880-1-lizhijian@fujitsu.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSS-9.1.0.1417-9.0.0.1002-28372.002 X-TM-AS-User-Approved-Sender: Yes X-TMASE-Version: IMSS-9.1.0.1417-9.0.1002-28372.002 X-TMASE-Result: 10--4.358700-10.000000 X-TMASE-MatchedRID: 9IrrHbNZyfpTorztX3wKRDBgCmbnj9JmwTlc9CcHMZerwqxtE531VNnf JrUSEbFDNYCBzzxsUnthuO+F4DLKpT+7nvNv6fe6ngIgpj8eDcBpkajQR5gb3savT21DsLD/UEh Wy9W70AEnRE+fI6etkmyD8trkO9mdwWwytO4EycIFdnSoTuV8apA1918zzYNWEwNF9ZEUYf9/da oMYxPppOWbgU3/1d0vmuemDR7HHuUf7ftDL+jmBcBgvHuudtHysNDybdOqCWh6WkJecb4mO8MYF nUbyvVJ/YPqDH/SjOk= X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 Received-SPF: pass client-ip=68.232.139.130; envelope-from=lizhijian@fujitsu.com; helo=esa5.hc1455-7.c3s2.iphmx.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Li Zhijian X-Patchwork-Original-From: Li Zhijian via From: "Zhijian Li (Fujitsu)" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Make the code more tight. Cc: Michael Tokarev Signed-off-by: Li Zhijian Reviewed-by: Peter Xu Reviewed-by: Zhang Chen --- This change/comment suggested by "Michael Tokarev " came a bit late at that time, let's update it together in these minor set this time. --- migration/colo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index 991806c06a..1b6d9da1c8 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -838,12 +838,11 @@ static void *colo_process_incoming_thread(void *opaque) /* Make sure all file formats throw away their mutable metadata */ bql_lock(); bdrv_activate_all(&local_err); + bql_unlock(); if (local_err) { - bql_unlock(); error_report_err(local_err); return NULL; } - bql_unlock(); failover_init_state();