Whamcloud - gitweb
LU-1095 debug: Improve recovery console messages
authorChristopher J. Morrone <morrone2@llnl.gov>
Sat, 3 Mar 2012 01:41:45 +0000 (17:41 -0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 9 May 2012 04:11:00 +0000 (00:11 -0400)
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@<unknown>

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 <morrone2@llnl.gov>
Change-Id: I457602c3440ba10475e4ddca7c4e58ef8669922c
Reviewed-on: http://review.whamcloud.com/2249
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_lib.c
lustre/obdclass/genops.c

index e4b1081..4487d5a 100644 (file)
@@ -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. */
index f4a7f1e..b69773a 100644 (file)
@@ -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 ? "<unknown>" :
                        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) |