From patchwork Tue Nov 15 10:19:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cedric Bosdonnat X-Patchwork-Id: 9429349 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 2587460469 for ; Tue, 15 Nov 2016 10:22:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E74E286B9 for ; Tue, 15 Nov 2016 10:22:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 036DF286CD; Tue, 15 Nov 2016 10:22:18 +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 A432E286B9 for ; Tue, 15 Nov 2016 10:22:17 +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 1c6aqg-0005vi-S5; Tue, 15 Nov 2016 10:20:18 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6aqf-0005rW-TJ for xen-devel@lists.xen.org; Tue, 15 Nov 2016 10:20:18 +0000 Received: from [85.158.143.35] by server-11.bemta-6.messagelabs.com id 97/B8-14466-161EA285; Tue, 15 Nov 2016 10:20:17 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRWlGSWpSXmKPExsVyuP0uq27CQ60 Ig/vHZC2WfFzM4sDocXT3b6YAxijWzLyk/IoE1oxX6z6zFLyUqjjT84uxgXGpSBcjF4eQwBJG iW/nn7J1MXJysAnYS3T9OcoEYosISEtc+3yZEaSIWeAEo0TPxs1ARRwcwgIOEh2LFUBqWARUJ Q4d3M0IYvMKWEps6HoLZksIyEtcuHqKBcTmBIr/PPqUHcQWErCQWHK5mxmiXlDi5MwnLCAjmQ XUJdbPEwIJMwO1Nm+dzTyBkXcWkqpZCFWzkFQtYGRexahRnFpUllqka2ysl1SUmZ5RkpuYmaN raGCml5taXJyYnpqTmFSsl5yfu4kRGFIMQLCDcef6wEOMkhxMSqK8Qqu1IoT4kvJTKjMSizPi i0pzUosPMcpwcChJ8Co8AMoJFqWmp1akZeYAgxsmLcHBoyTCGwOS5i0uSMwtzkyHSJ1iVJQS5 w0ASQiAJDJK8+DaYBF1iVFWSpiXEegQIZ6C1KLczBJU+VeM4hyMSsK8r+4DTeHJzCuBm/4KaD ET0OJd5hogi0sSEVJSDYxXfgXu37H316b1/RkLD+SlSPD0eV36+/XxccWt1u3zu7fM9369ZsG vouOGWglma1RT/WRkuXVzfm2cfUiI3+pX37eH80P82WIm5hl79y3w21/mZ6ql4eTKIhU/J3zz Mu4ZgX4L7BbOXqYutujNmijZ2qj/NVLWT4TbpM+Z3GpN3LJfgXE/+0olluKMREMt5qLiRABLJ HHNowIAAA== X-Env-Sender: cbosdonnat@suse.com X-Msg-Ref: server-4.tower-21.messagelabs.com!1479205216!37195064!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 23905 invoked from network); 15 Nov 2016 10:20:16 -0000 Received: from smtp.nue.novell.com (HELO smtp.nue.novell.com) (195.135.221.5) by server-4.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 15 Nov 2016 10:20:16 -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:15 +0100 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= To: xen-devel@lists.xen.org Date: Tue, 15 Nov 2016 11:19:07 +0100 Message-Id: <20161115101913.10396-30-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 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: Cédric 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; }