From 4a6af0f3e210126ddf24b8f765c04d09df5e0038 Mon Sep 17 00:00:00 2001 From: "Christopher J. Morrone" Date: Fri, 2 Mar 2012 17:41:45 -0800 Subject: [PATCH] LU-1095 debug: Improve recovery console messages Quiet and/or improve a few recovery messages. A sysadmin will not understand this: 2012-03-02 16:27:19 Lustre: 5211:0:(ldlm_lib.c:2072: target_queue_recovery_request()) Next recovery transno: 410629539, current: 410629539, replaying Messages like this are too verbose for the console: 2012-03-02 16:27:59 LustreError: 5286:0: (genops.c:1270:class_disconnect_stale_exports()) lc3-OST0004: disconnect stale client 47808f4f-9f36-e8eb-f363-14b1abe4ac57@ and can be left to this simpler message: 2012-03-02 16:27:59 Lustre: lc3-OST0005: disconnecting 0 stale clients Signed-off-by: Christopher J. Morrone Change-Id: I457602c3440ba10475e4ddca7c4e58ef8669922c Reviewed-on: http://review.whamcloud.com/2249 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Niu Yawei Reviewed-by: Liu Xuezhao Reviewed-by: Oleg Drokin --- lustre/ldlm/ldlm_lib.c | 9 +++++---- lustre/obdclass/genops.c | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index e4b1081..4487d5a 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -1692,8 +1692,8 @@ repeat: } else if (obd->obd_recovery_expired) { obd->obd_recovery_expired = 0; /** If some clients died being recovered, evict them */ - CDEBUG(D_WARNING, - "recovery is timed out, evict stale exports\n"); + LCONSOLE_WARN("%s: recovery is timed out, " + "evict stale exports\n", obd->obd_name); /** evict cexports with no replay in queue, they are stalled */ class_disconnect_stale_exports(obd, health_check); /** continue with VBR */ @@ -2177,8 +2177,9 @@ int target_queue_recovery_request(struct ptlrpc_request *req, * Also, a resent, replayed request that has already been * handled will pass through here and be processed immediately. */ - CWARN("Next recovery transno: "LPU64", current: "LPU64", replaying\n", - obd->obd_next_recovery_transno, transno); + CDEBUG(D_HA, "Next recovery transno: "LPU64 + ", current: "LPU64", replaying\n", + obd->obd_next_recovery_transno, transno); cfs_spin_lock(&obd->obd_recovery_task_lock); if (transno < obd->obd_next_recovery_transno) { /* Processing the queue right now, don't re-add. */ diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index f4a7f1ec..b69773a 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -1302,7 +1302,7 @@ void class_disconnect_stale_exports(struct obd_device *obd, cfs_list_move(&exp->exp_obd_chain, &work_list); evicted++; - CDEBUG(D_ERROR, "%s: disconnect stale client %s@%s\n", + CDEBUG(D_HA, "%s: disconnect stale client %s@%s\n", obd->obd_name, exp->exp_client_uuid.uuid, exp->exp_connection == NULL ? "" : libcfs_nid2str(exp->exp_connection->c_peer.nid)); @@ -1311,8 +1311,8 @@ void class_disconnect_stale_exports(struct obd_device *obd, cfs_spin_unlock(&obd->obd_dev_lock); if (evicted) { - CDEBUG(D_HA, "%s: disconnecting %d stale clients\n", - obd->obd_name, evicted); + LCONSOLE_WARN("%s: disconnecting %d stale clients\n", + obd->obd_name, evicted); obd->obd_stale_clients += evicted; } class_disconnect_export_list(&work_list, exp_flags_from_obd(obd) | -- 1.8.3.1