From patchwork Tue Nov 15 10:18:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cedric Bosdonnat X-Patchwork-Id: 9429337 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 BCC1360469 for ; Tue, 15 Nov 2016 10:22:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4DF7286B9 for ; Tue, 15 Nov 2016 10:22:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 991B4286CD; Tue, 15 Nov 2016 10:22:09 +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 D194D286B9 for ; Tue, 15 Nov 2016 10:22:08 +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 1c6aqW-0005Ul-S9; Tue, 15 Nov 2016 10:20:08 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6aqW-0005Pb-Bg for xen-devel@lists.xen.org; Tue, 15 Nov 2016 10:20:08 +0000 Received: from [85.158.137.68] by server-8.bemta-3.messagelabs.com id B9/46-26755-751EA285; Tue, 15 Nov 2016 10:20:07 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeJIrShJLcpLzFFi42I53H6XVTfsoVa EwZXDJhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8as/eUFs5Qr7n78ydTAuFKyi5GLQ0hgCaPE 85mPGbsYOTnYBOwluv4cZQKxRQSkJa59vswIUsQscIJRomfjZjaQhLCAs8TSPzNZQWwWAVWJn /+OsYPYvAKWEu9vrmAGsSUE5CUuXD3FAmJzAsV/Hn0KViMkYCGx5HI3M0S9oMTJmU+AajiAFq hLrJ8nBBJmBmpt3jqbeQIj7ywkVbMQqmYhqVrAyLyKUb04tagstUjXTC+pKDM9oyQ3MTNH19D AWC83tbg4MT01JzGpWC85P3cTIzCg6hkYGHcwXmlzPsQoycGkJMortForQogvKT+lMiOxOCO+ qDQntfgQowwHh5IE74QHQDnBotT01Iq0zBxgaMOkJTh4lER4p4OkeYsLEnOLM9MhUqcYFaXEe QNAEgIgiYzSPLg2WDxdYpSVEuZlZGBgEOIpSC3KzSxBlX/FKM7BqCTMuwhkCk9mXgnc9FdAi5 mAFu8y1wBZXJKIkJJqYDTmiv/KXiA0W3/bPInzZwviN2b+rZJudN+9dNL3smK/c7JHJ3mEN6n cn1zfd6+w77/3xQ3sPC5n694xnN3M0qPmfZKnXfL/lhl/b19y9j3/x1Sr66KYBft3pw8/n094 d/2v166Op8azfJ5MMcsL92c9W8jHLtXycpUhY8gJyU0xqedll+T7HVJiKc5INNRiLipOBACQC y3YogIAAA== X-Env-Sender: cbosdonnat@suse.com X-Msg-Ref: server-4.tower-31.messagelabs.com!1479205204!12916835!1 X-Originating-IP: [195.135.221.5] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 9.0.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 11463 invoked from network); 15 Nov 2016 10:20:05 -0000 Received: from smtp.nue.novell.com (HELO smtp.nue.novell.com) (195.135.221.5) by server-4.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 15 Nov 2016 10:20:05 -0000 Received: from laptop.vms (mhy71-2-88-167-63-197.fbx.proxad.net [88.167.63.197]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Tue, 15 Nov 2016 11:20:05 +0100 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= To: xen-devel@lists.xen.org Date: Tue, 15 Nov 2016 11:18:54 +0100 Message-Id: <20161115101913.10396-17-cbosdonnat@suse.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161115101913.10396-1-cbosdonnat@suse.com> References: <20161115101913.10396-1-cbosdonnat@suse.com> MIME-Version: 1.0 Cc: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= , Wei Liu , Ian Jackson , =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Subject: [Xen-devel] [PATCH 16/35] libxl/libxl_dom_save.c: used LOG*D functions 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 From: Cédric Bosdonnat Use LOG*D logging functions where possible instead of the LOG* ones. Signed-off-by: Cédric Bosdonnat --- tools/libxl/libxl_dom_save.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tools/libxl/libxl_dom_save.c b/tools/libxl/libxl_dom_save.c index 579039f..77fe30e 100644 --- a/tools/libxl/libxl_dom_save.c +++ b/tools/libxl/libxl_dom_save.c @@ -90,9 +90,9 @@ static void domain_suspend_switch_qemu_xen_traditional_logdirty if (rc) goto out; if (!got_ret || strcmp(got, got_ret)) { - LOG(ERROR,"controlling logdirty: qemu was already sent" - " command `%s' (xenstore path `%s') but result is `%s'", - got, lds->cmd_path, got_ret ? got_ret : ""); + LOGD(ERROR, domid, "controlling logdirty: qemu was already sent" + " command `%s' (xenstore path `%s') but result is `%s'", + got, lds->cmd_path, got_ret ? got_ret : ""); rc = ERROR_FAIL; goto out; } @@ -115,7 +115,7 @@ static void domain_suspend_switch_qemu_xen_traditional_logdirty return; out: - LOG(ERROR,"logdirty switch failed (rc=%d), abandoning suspend",rc); + LOGD(ERROR, domid, "logdirty switch failed (rc=%d), abandoning suspend",rc); libxl__xs_transaction_abort(gc, &t); switch_logdirty_done(egc,lds,rc); } @@ -129,7 +129,8 @@ static void domain_suspend_switch_qemu_xen_logdirty rc = libxl__qmp_set_global_dirty_log(gc, domid, enable); if (rc) - LOG(ERROR,"logdirty switch failed (rc=%d), abandoning suspend",rc); + LOGD(ERROR, domid, + "logdirty switch failed (rc=%d), abandoning suspend",rc); lds->callback(egc, lds, rc); } @@ -179,8 +180,8 @@ void libxl__domain_common_switch_qemu_logdirty(libxl__egc *egc, lds->callback(egc, lds, 0); break; default: - LOG(ERROR,"logdirty switch failed" - ", no valid device model version found, abandoning suspend"); + LOGD(ERROR, domid, "logdirty switch failed" + ", no valid device model version found, abandoning suspend"); lds->callback(egc, lds, ERROR_FAIL); } } @@ -346,8 +347,8 @@ void libxl__domain_save(libxl__egc *egc, libxl__domain_save_state *dss) libxl__domain_suspend_state *dsps = &dss->dsps; if (dss->checkpointed_stream != LIBXL_CHECKPOINTED_STREAM_NONE && !r_info) { - LOG(ERROR, "Migration stream is checkpointed, but there's no " - "checkpoint info!"); + LOGD(ERROR, domid, "Migration stream is checkpointed, but there's no " + "checkpoint info!"); rc = ERROR_INVAL; goto out; } @@ -387,7 +388,7 @@ void libxl__domain_save(libxl__egc *egc, libxl__domain_save_state *dss) ret = xc_domain_getvnuma(CTX->xch, domid, &nr_vnodes, &nr_vmemranges, &nr_vcpus, NULL, NULL, NULL); if (ret != -1 || errno != EOPNOTSUPP) { - LOG(ERROR, "Cannot save a guest with vNUMA configured"); + LOGD(ERROR, domid, "Cannot save a guest with vNUMA configured"); rc = ERROR_FAIL; goto out; } @@ -491,17 +492,17 @@ int libxl__restore_emulator_xenstore_data(libxl__domain_create_state *dcs, /* Sanitise 'key'. */ if (!next) { rc = ERROR_FAIL; - LOG(ERROR, "Key in xenstore data not NUL terminated"); + LOGD(ERROR, domid, "Key in xenstore data not NUL terminated"); goto out; } if (key[0] == '\0') { rc = ERROR_FAIL; - LOG(ERROR, "empty key found in xenstore data"); + LOGD(ERROR, domid, "empty key found in xenstore data"); goto out; } if (key[0] == '/') { rc = ERROR_FAIL; - LOG(ERROR, "Key in xenstore data not relative"); + LOGD(ERROR, domid, "Key in xenstore data not relative"); goto out; } @@ -511,7 +512,7 @@ int libxl__restore_emulator_xenstore_data(libxl__domain_create_state *dcs, /* Sanitise 'val'. */ if (!next) { rc = ERROR_FAIL; - LOG(ERROR, "Val in xenstore data not NUL terminated"); + LOGD(ERROR, domid, "Val in xenstore data not NUL terminated"); goto out; }