Whamcloud - gitweb
ORNL-14: debug: print recovery completion message
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 23 Aug 2011 21:31:58 +0000 (15:31 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 5 Oct 2011 08:30:03 +0000 (04:30 -0400)
Print a proper "end of recovery" message to match the one printed
by 1.x so that it is clear when recovery has finished, how long it
took, and how many clients recovered.

This should have been part of the original patch committed for
eda8eab5abeef1117ae1082533b5888a91875e12.

Change-Id: I3a8793fdcb3c665e8df0d39ae82b4c56fb1bb527
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1278
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_lib.c

index a8af509..366ac15 100644 (file)
@@ -1217,9 +1217,16 @@ static void target_exp_dequeue_req_replay(struct ptlrpc_request *req)
 #ifdef __KERNEL__
 static void target_finish_recovery(struct obd_device *obd)
 {
 #ifdef __KERNEL__
 static void target_finish_recovery(struct obd_device *obd)
 {
+        time_t elapsed_time = max_t(time_t, 1, cfs_time_current_sec() -
+                                    obd->obd_recovery_start);
         ENTRY;
         ENTRY;
-        LCONSOLE_INFO("%s: sending delayed replies to recovered clients\n",
-                      obd->obd_name);
+
+        LCONSOLE_INFO("%s: Recovery over after %d:%.02d, of %d clients "
+                      "%d recovered and %d %s evicted.\n", obd->obd_name,
+                      (int)elapsed_time / 60, (int)elapsed_time % 60,
+                      obd->obd_max_recoverable_clients,
+                      obd->obd_connected_clients, obd->obd_stale_clients,
+                      obd->obd_stale_clients == 1 ? "was" : "were");
 
         ldlm_reprocess_all_ns(obd->obd_namespace);
         cfs_spin_lock(&obd->obd_recovery_task_lock);
 
         ldlm_reprocess_all_ns(obd->obd_namespace);
         cfs_spin_lock(&obd->obd_recovery_task_lock);