From patchwork Fri Dec 2 15:08:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cedric Bosdonnat X-Patchwork-Id: 9458703 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 63E3760236 for ; Fri, 2 Dec 2016 15:11:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 567752855C for ; Fri, 2 Dec 2016 15:11:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B86628563; Fri, 2 Dec 2016 15:11:28 +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 BE45C2847C for ; Fri, 2 Dec 2016 15:11:27 +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 1cCpSk-0003Ad-RD; Fri, 02 Dec 2016 15:09:22 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cCpSj-000388-Dd for xen-devel@lists.xen.org; Fri, 02 Dec 2016 15:09:21 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id ED/EB-15840-0AE81485; Fri, 02 Dec 2016 15:09:20 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeJIrShJLcpLzFFi42I53H6XVXdun2O EwbaTnBZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8aB3RtYCvYoV+zt1G9gPC7ZxcjFISSwhFHi 8IqnrF2MnBxsAvYSXX+OMoHYIgLSEtc+X2YEsZkFSiSaznUydzFycAgLuElsPaoMEmYRUJVou v6aESTMK2Ap0TKRAyQsISAvsfD8EbApnEDhBy3XwaYICVhINN+4wwJi8woISpyc+YQFpJVZQF 1i/TwhiEXyEs1bZzNPYOSdhaRqFkLVLCRVCxiZVzGqF6cWlaUW6ZrqJRVlpmeU5CZm5ugaGhj r5aYWFyemp+YkJhXrJefnbmIEhlI9AwPjDsbLX50OMUpyMCmJ8prmOEYI8SXlp1RmJBZnxBeV 5qQWH2KU4eBQkuBt7gXKCRalpqdWpGXmAIMaJi3BwaMkwqsKkuYtLkjMLc5Mh0idYlSUEud1B kkIgCQySvPg2mCRdIlRVkqYl5GBgUGIpyC1KDezBFX+FaM4B6OSMMQUnsy8Erjpr4AWMwEt7r huD7K4JBEhJdXAuOIW+45vLddb/J8t/y42QzB1RpLo/tOLFk/g6n+gfOrva9nX4efuPw98IxC 8Wi2iZknBd4P9vlZZQov/Xl4XPmtbyZfQv5X3IhMmFZTxSXeKbza2/vXWb9G/l/0Wq0PMAwuN Lj1Jnc419+VCF2+Oc5NtszZargyfF2K9cVqnZKrpqsXsC9prtiuxFGckGmoxFxUnAgBW4DjAn wIAAA== X-Env-Sender: cbosdonnat@suse.com X-Msg-Ref: server-15.tower-31.messagelabs.com!1480691356!70151222!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 17732 invoked from network); 2 Dec 2016 15:09:17 -0000 Received: from smtp.nue.novell.com (HELO smtp.nue.novell.com) (195.135.221.5) by server-15.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 2 Dec 2016 15:09:17 -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); Fri, 02 Dec 2016 16:09:16 +0100 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= To: xen-devel@lists.xen.org Date: Fri, 2 Dec 2016 16:08:22 +0100 Message-Id: <20161202150841.31227-17-cbosdonnat@suse.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161202150841.31227-1-cbosdonnat@suse.com> References: <20161202150841.31227-1-cbosdonnat@suse.com> MIME-Version: 1.0 Cc: Ian Jackson , Wei Liu , 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 Acked-by: Wei Liu --- 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; }