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>
#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);
- 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);