From patchwork Fri Dec 2 15:08:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cedric Bosdonnat X-Patchwork-Id: 9458681 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 ED4E860236 for ; Fri, 2 Dec 2016 15:11:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0AC32847C for ; Fri, 2 Dec 2016 15:11:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D57FF2855C; Fri, 2 Dec 2016 15:11:12 +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 7BFDB2847C for ; Fri, 2 Dec 2016 15:11:12 +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 1cCpSp-0003Tk-Vr; Fri, 02 Dec 2016 15:09:27 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cCpSo-0003NK-UE for xen-devel@lists.xen.org; Fri, 02 Dec 2016 15:09:27 +0000 Received: from [193.109.254.147] by server-3.bemta-6.messagelabs.com id 1E/94-08948-6AE81485; Fri, 02 Dec 2016 15:09:26 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRWlGSWpSXmKPExsVyuP0uq+7SPsc Ig63PVC2WfFzM4sDocXT3b6YAxijWzLyk/IoE1owzn+8zFXRLV2xruMTawHhYpIuRi0NIYAmj xPbr01i7GDk52ATsJbr+HGUCsUUEpCWufb7MCGIzC5RINJ3rZAaxhQWcJd4dbACrZxFQlfiy7 DlYDa+ApcTsr/dZQGwJAXmJheePgM3hBIo/aLkOViMkYCHRfOMOC0S9oMTJmU+AbA6g+eoS6+ cJQaySl2jeOpt5AiPvLCRVsxCqZiGpWsDIvIpRozi1qCy1SNfQQi+pKDM9oyQ3MTNH19DATC8 3tbg4MT01JzGpWC85P3cTIzCkGIBgB+PNjQGHGCU5mJREeU1zHCOE+JLyUyozEosz4otKc1KL DzHKcHAoSfBu6wLKCRalpqdWpGXmAIMbJi3BwaMkwnseJM1bXJCYW5yZDpE6xagoJc77GSQhA JLIKM2Da4NF1CVGWSlhXkagQ4R4ClKLcjNLUOVfMYpzMCoJ864FmcKTmVcCN/0V0GImoMUd1+ 1BFpckIqSkGhg185lrrhX4ujgkfRW7NNdMwTLq/MnVDnZFnnrzQj7UWMr8WpVWJ2lSk3zq7pb VpunORxgro+a0fT8va3bmqjTbYu0p9/X+Z898vLY+s76Hfdtdgf2PL5xcoD/3x/UtbTMllN/U /d8geEWpiavtFl/SArGPJ77rNe5+q3kkb3r+6w3N9hcXTm1UYinOSDTUYi4qTgQAzbPcHaMCA AA= X-Env-Sender: cbosdonnat@suse.com X-Msg-Ref: server-4.tower-27.messagelabs.com!1480691365!74550953!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 45812 invoked from network); 2 Dec 2016 15:09:25 -0000 Received: from smtp.nue.novell.com (HELO smtp.nue.novell.com) (195.135.221.5) by server-4.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 2 Dec 2016 15:09:25 -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:24 +0100 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= To: xen-devel@lists.xen.org Date: Fri, 2 Dec 2016 16:08:35 +0100 Message-Id: <20161202150841.31227-30-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 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 Acked-by: Wei Liu --- 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; }