From patchwork Fri Mar 17 08:42:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Chen X-Patchwork-Id: 9630013 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 423FA602D7 for ; Fri, 17 Mar 2017 08:46:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C54927B13 for ; Fri, 17 Mar 2017 08:46:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3142028694; Fri, 17 Mar 2017 08:46:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D301327D29 for ; Fri, 17 Mar 2017 08:46:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1conUM-0003Qi-6C; Fri, 17 Mar 2017 08:43:58 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1conUK-0003QR-E5 for xen-devel@lists.xenproject.org; Fri, 17 Mar 2017 08:43:56 +0000 Received: from [85.158.139.211] by server-1.bemta-5.messagelabs.com id ED/7E-26304-BC1ABC85; Fri, 17 Mar 2017 08:43:55 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJIsWRWlGSWpSXmKPExsViPb2gRff0wtM RBh+2cVh83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBk33nWyFFwVq2jbu5a1gfGDUBcjJ4eEgJ/E lSMb2EFsIYFaiS2z7rB1MXIB2SsZJW5/bWaFcHYxSlw+f4gJpIpNwEBizpWJjCC2iICvxNGnd 9hBipgFTjJKbP1/DSwhLBAgMf3ceqAEBweLgKpE+xE/kDCvgI/Elc4D7BCb5SRunutkBrE5ge Zs/fYE6gofiU9bnzFD1AtKnJz5hAXEZhaQkDj44gUzyEgJAUWJtmu8EGN0JY5N+sEIYWtKbFt 9jg2ixEpi6lZPiLCgxM7nF9gmMIrMQjJ0FpKhCxiZVjFqFKcWlaUW6RpZ6iUVZaZnlOQmZubo GhqY6uWmFhcnpqfmJCYV6yXn525iBAZ5PQMD4w7Gy1v8DjFKcjApifJ2njwVIcSXlJ9SmZFYn BFfVJqTWnyIUYaDQ0mC99H80xFCgkWp6akVaZk5wHiDSUtw8CiJ8EouAErzFhck5hZnpkOkTj EqSonzxoIkBEASGaV5cG2wGL/EKCslzMvIwMAgxFOQWpSbWYIq/4pRnINRSZhXA2QKT2ZeCdz 0V0CLmYAWv/1wAmRxSSJCSqqBcUnqbunLPlKKpSwnZXwy//h+2niEl4ct8NtX/VyDifPPmj4Q c7fYb7SG9WeDwZ0THK+XbLCYmpWg5O7SpjTBJ/nSRBmJJb/5ZmS3mz29IssTuWUp4/mHQssEg m/vZXwVWM62p37SzzshjznzFCIc71/8Gvlo5paMpCjlde57//z+89Iyd8fNLUosxRmJhlrMRc WJAGq6msXsAgAA X-Env-Sender: zhangchen.fnst@cn.fujitsu.com X-Msg-Ref: server-13.tower-206.messagelabs.com!1489740231!74428881!3 X-Originating-IP: [59.151.112.132] X-SpamReason: No, hits=0.0 required=7.0 tests=SUBJECT_RANDOMQ X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 41129 invoked from network); 17 Mar 2017 08:43:54 -0000 Received: from cn.fujitsu.com (HELO heian.cn.fujitsu.com) (59.151.112.132) by server-13.tower-206.messagelabs.com with SMTP; 17 Mar 2017 08:43:54 -0000 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="16690661" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 17 Mar 2017 16:43:52 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id A94CA47D8B72; Fri, 17 Mar 2017 16:43:53 +0800 (CST) Received: from localhost.localdomain (10.167.226.56) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 17 Mar 2017 16:43:51 +0800 From: Zhang Chen To: Xen devel , Wei Liu Date: Fri, 17 Mar 2017 16:42:32 +0800 Message-ID: <1489740152-4091-3-git-send-email-zhangchen.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1489740152-4091-1-git-send-email-zhangchen.fnst@cn.fujitsu.com> References: <1489740152-4091-1-git-send-email-zhangchen.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.56] X-yoursite-MailScanner-ID: A94CA47D8B72.AE501 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: zhangchen.fnst@cn.fujitsu.com Cc: eddie dong , Bian Naimeng , Ian Jackson , Li Zhijian , Zhang Chen Subject: [Xen-devel] [PATCH 2/2] libxl/libxl_qmp.c: Update COLO query replication status API X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Because of qemu side patch changed the API that comment by community, So we fix it in Xen side. Signed-off-by: Zhang Chen --- tools/libxl/libxl_colo_restore.c | 2 +- tools/libxl/libxl_colo_save.c | 3 ++- tools/libxl/libxl_internal.h | 2 +- tools/libxl/libxl_qmp.c | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/libxl/libxl_colo_restore.c b/tools/libxl/libxl_colo_restore.c index 7178ae9..0c535bd 100644 --- a/tools/libxl/libxl_colo_restore.c +++ b/tools/libxl/libxl_colo_restore.c @@ -986,7 +986,7 @@ static void colo_suspend_vm_done(libxl__egc *egc, crcs->status = LIBXL_COLO_SUSPENDED; - if (libxl__qmp_get_replication_error(gc, crs->domid)) { + if (libxl__qmp_query_xen_replication_status(gc, crs->domid)) { LOGD(ERROR, crs->domid, "replication error occurs when secondary vm is running"); goto out; } diff --git a/tools/libxl/libxl_colo_save.c b/tools/libxl/libxl_colo_save.c index eabc04c..f687d5a 100644 --- a/tools/libxl/libxl_colo_save.c +++ b/tools/libxl/libxl_colo_save.c @@ -345,7 +345,8 @@ static void colo_read_svm_suspended_done(libxl__egc *egc, goto out; } - if (!css->paused && libxl__qmp_get_replication_error(gc, dss->domid)) { + if (!css->paused && + libxl__qmp_query_xen_replication_status(gc, dss->domid)) { LOGD(ERROR, dss->domid, "replication error occurs when primary vm is running"); goto out; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 9fc05e7..25cb08a 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1829,7 +1829,7 @@ _hidden int libxl__qmp_nbd_server_add(libxl__gc *gc, int domid, _hidden int libxl__qmp_start_replication(libxl__gc *gc, int domid, bool primary); /* Get replication error that occurs when the vm is running */ -_hidden int libxl__qmp_get_replication_error(libxl__gc *gc, int domid); +_hidden int libxl__qmp_query_xen_replication_status(libxl__gc *gc, int domid); /* Do checkpoint */ _hidden int libxl__qmp_colo_do_checkpoint(libxl__gc *gc, int domid); /* Stop replication */ diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c index eef7722..eab993a 100644 --- a/tools/libxl/libxl_qmp.c +++ b/tools/libxl/libxl_qmp.c @@ -1079,9 +1079,9 @@ int libxl__qmp_start_replication(libxl__gc *gc, int domid, bool primary) return qmp_run_command(gc, domid, "xen-set-replication", args, NULL, NULL); } -int libxl__qmp_get_replication_error(libxl__gc *gc, int domid) +int libxl__qmp_query_xen_replication_status(libxl__gc *gc, int domid) { - return qmp_run_command(gc, domid, "xen-get-replication-error", NULL, + return qmp_run_command(gc, domid, "query-xen-replication-status", NULL, NULL, NULL); }