From patchwork Thu Nov 17 17:36:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cedric Bosdonnat X-Patchwork-Id: 9434849 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 102606047D for ; Thu, 17 Nov 2016 17:39:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02BD620499 for ; Thu, 17 Nov 2016 17:39:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB7A029689; Thu, 17 Nov 2016 17:39:05 +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 9475420499 for ; Thu, 17 Nov 2016 17:39:05 +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 1c7QcT-0000dB-4q; Thu, 17 Nov 2016 17:37:05 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7QcR-0000Xt-3A for xen-devel@lists.xen.org; Thu, 17 Nov 2016 17:37:03 +0000 Received: from [85.158.143.35] by server-7.bemta-6.messagelabs.com id F9/3F-12058-EBAED285; Thu, 17 Nov 2016 17:37:02 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeJIrShJLcpLzFFi42I53H6XVXfvK90 IgxsLtS2WfFzM4sDocXT3b6YAxijWzLyk/IoE1oyFa/+wFzyWquid8JqlgXG+SBcjJ4eQwBJG iQVvnEFsNgF7ia4/R5lAbBEBaYlrny8zgtjMAiUSe592gNnCAs4S7w42sILYLAKqEm/n7mYGs XkFLCS2tzSC9UoIyEtcuHqKBcTmBIofOHyOGWKXucSbNwuYIOoFJU7OfAJUwwE0X11i/TwhiF XyEs1bZzNPYOSdhaRqFkLVLCRVCxiZVzFqFKcWlaUW6Rob6iUVZaZnlOQmZuboGhqY6eWmFhc npqfmJCYV6yXn525iBAYUAxDsYGxaFHiIUZKDSUmUl/mlboQQX1J+SmVGYnFGfFFpTmrxIUYZ Dg4lCd4CkJxgUWp6akVaZg4wtGHSEhw8SiK8kiBp3uKCxNzizHSI1ClGRSlx3jCQhABIIqM0D 64NFk+XGGWlhHkZgQ4R4ilILcrNLEGVf8UozsGoJMyrATKFJzOvBG76K6DFTECL9wjogCwuSU RISTUwNrSpFl3llgz+oD1ZfnXVTfPZpfeXvMsJNXrl8PDSMT3WM4LF143PT0yOntnsNfUka9r 7ie36h1dcjDj9SD0wVIvDY2Ze4/d08bOPgBH3bcHhl74ViqfnzmuOCUsOda4+WWop6d2z48pb 1TnCT1yjD4mf2+vhz1pcUbf8eIHAsp320wRTrCOUWIozEg21mIuKEwHWCm/togIAAA== X-Env-Sender: cbosdonnat@suse.com X-Msg-Ref: server-13.tower-21.messagelabs.com!1479404221!43884696!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 12021 invoked from network); 17 Nov 2016 17:37:01 -0000 Received: from smtp.nue.novell.com (HELO smtp.nue.novell.com) (195.135.221.5) by server-13.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 17 Nov 2016 17:37:01 -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:37:00 +0100 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= To: xen-devel@lists.xen.org Date: Thu, 17 Nov 2016 18:36:11 +0100 Message-Id: <20161117173617.6697-30-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 29/35] libxl/libxl_remus.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_remus.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tools/libxl/libxl_remus.c b/tools/libxl/libxl_remus.c index 54ec7de..29a4783 100644 --- a/tools/libxl/libxl_remus.c +++ b/tools/libxl/libxl_remus.c @@ -84,7 +84,8 @@ void libxl__remus_setup(libxl__egc *egc, libxl__remus_state *rs) if (libxl_defbool_val(info->netbuf)) { if (!libxl__netbuffer_enabled(gc)) { - LOG(ERROR, "Remus: No support for network buffering"); + LOGD(ERROR, dss->domid, + "Remus: No support for network buffering"); goto out; } cds->device_kind_flags |= (1 << LIBXL__DEVICE_KIND_VIF); @@ -101,8 +102,8 @@ void libxl__remus_setup(libxl__egc *egc, libxl__remus_state *rs) rs->interval = info->interval; if (init_device_subkind(cds)) { - LOG(ERROR, "Remus: failed to init device subkind for guest %u", - dss->domid); + LOGD(ERROR, dss->domid, + "Remus: failed to init device subkind"); goto out; } @@ -130,8 +131,7 @@ static void remus_setup_done(libxl__egc *egc, return; } - LOG(ERROR, "Remus: failed to setup device for guest with domid %u, rc %d", - dss->domid, rc); + LOGD(ERROR, dss->domid, "Remus: failed to setup device, rc %d", rc); cds->callback = remus_setup_failed; libxl__checkpoint_devices_teardown(egc, cds); } @@ -143,8 +143,8 @@ static void remus_setup_failed(libxl__egc *egc, STATE_AO_GC(dss->ao); if (rc) - LOG(ERROR, "Remus: failed to teardown device after setup failed" - " for guest with domid %u, rc %d", dss->domid, rc); + LOGD(ERROR, dss->domid, + "Remus: failed to teardown device after setup failed, rc %d", rc); cleanup_device_subkind(cds); @@ -165,8 +165,8 @@ void libxl__remus_teardown(libxl__egc *egc, EGC_GC; - LOG(WARN, "Remus: Domain suspend terminated with rc %d," - " teardown Remus devices...", rc); + LOGD(WARN, dss->domid, "Remus: Domain suspend terminated with rc %d," + " teardown Remus devices...", rc); cds->callback = remus_teardown_done; libxl__checkpoint_devices_teardown(egc, cds); } @@ -179,8 +179,8 @@ static void remus_teardown_done(libxl__egc *egc, STATE_AO_GC(dss->ao); if (rc) - LOG(ERROR, "Remus: failed to teardown device for guest with domid %u," - " rc %d", dss->domid, rc); + LOGD(ERROR, dss->domid, "Remus: failed to teardown device," + " rc %d", rc); cleanup_device_subkind(cds); @@ -309,7 +309,8 @@ static void remus_checkpoint_stream_written( STATE_AO_GC(dss->ao); if (rc) { - LOG(ERROR, "Failed to save device model. Terminating Remus.."); + LOGD(ERROR, dss->domid, "Failed to save device model." + " Terminating Remus.."); goto out; } @@ -331,7 +332,7 @@ static void remus_devices_commit_cb(libxl__egc *egc, STATE_AO_GC(dss->ao); if (rc) { - LOG(ERROR, "Failed to do device commit op." + LOGD(ERROR, dss->domid, "Failed to do device commit op." " Terminating Remus.."); goto out; }