From patchwork Thu Nov 17 17:35:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cedric Bosdonnat X-Patchwork-Id: 9434803 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 D42826047D for ; Thu, 17 Nov 2016 17:38:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C649E29689 for ; Thu, 17 Nov 2016 17:38:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB6CF2968D; Thu, 17 Nov 2016 17:38:30 +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 5923329689 for ; Thu, 17 Nov 2016 17:38:30 +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 1c7QcF-00007m-Eb; Thu, 17 Nov 2016 17:36:51 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7QcE-0008WA-2z for xen-devel@lists.xen.org; Thu, 17 Nov 2016 17:36:50 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id 22/83-01948-1BAED285; Thu, 17 Nov 2016 17:36:49 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjkeJIrShJLcpLzFFi42I53H6XVXfdK90 Ig5lXlCyWfFzM4sDocXT3b6YAxijWzLyk/IoE1oxPk+ILpihXzD21kKmBcbFkFyMXh5DAEkaJ bT1nmLoYOTnYBOwluv4cBbNFBKQlrn2+zAhiMwuUSOx92gFkc3AIC7hJbD2qDBJmEVCVWHzoI wuIzStgIXG7aRFYuYSAvMSFq6fA4pxA8QOHzzGD2EIC5hJv3ixggqgXlDg58wkLyEhmAXWJ9f OEIDbJSzRvnc08gZF3FpKqWQhVs5BULWBkXsWoUZxaVJZapGtorJdUlJmeUZKbmJmja2hgqpe bWlycmJ6ak5hUrJecn7uJERhODECwg/HfNs9DjJIcTEqivMwvdSOE+JLyUyozEosz4otKc1KL DzHKcHAoSfAWgOQEi1LTUyvSMnOAgQ2TluDgURLhlQRJ8xYXJOYWZ6ZDpE4xKkqJ84aBJARAE hmleXBtsGi6xCgrJczLCHSIEE9BalFuZgmq/CtGcQ5GJWHeByBTeDLzSuCmvwJazAS0eI+ADs jikkSElFQDo12PwbtJqtesW96KVNX0dc+4LWR7UsmLVSn70/Z7D7dOdpbsY3/xlSWNkyNy291 tJ2d6tXh23e3U1H+uunqve4ac+dt//9M9/OrZ5/PdZWv0fbvwl4yWMVtFX5Xk8h/KG/dvXHCL I8Tuc9qJ17Mm/9xnIG54ea+hlqHGj8/OS5WZT365F7ZpvxJLcUaioRZzUXEiAPE7NfWhAgAA X-Env-Sender: cbosdonnat@suse.com X-Msg-Ref: server-3.tower-206.messagelabs.com!1479404205!67245589!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 46791 invoked from network); 17 Nov 2016 17:36:46 -0000 Received: from smtp.nue.novell.com (HELO smtp.nue.novell.com) (195.135.221.5) by server-3.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 17 Nov 2016 17:36:46 -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); Thu, 17 Nov 2016 18:36:44 +0100 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= To: xen-devel@lists.xen.org Date: Thu, 17 Nov 2016 18:35:58 +0100 Message-Id: <20161117173617.6697-17-cbosdonnat@suse.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161117173617.6697-1-cbosdonnat@suse.com> References: <20161117173617.6697-1-cbosdonnat@suse.com> MIME-Version: 1.0 Cc: Wei Liu , Ian Jackson , Cedric Bosdonnat Subject: [Xen-devel] [PATCH v2 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: Cedric 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; }