Whamcloud - gitweb
b=19980
authoranserper <anserper>
Thu, 2 Jul 2009 21:59:21 +0000 (21:59 +0000)
committeranserper <anserper>
Thu, 2 Jul 2009 21:59:21 +0000 (21:59 +0000)
i=Andrew Perepechko
i=Alexey Lyashkov
o=Mike Pershin

fix for recovery messages

lustre/ldlm/ldlm_lib.c
lustre/obdclass/genops.c

index d18f8bc..18601e6 100644 (file)
@@ -1133,7 +1133,7 @@ static void target_send_delayed_replies(struct obd_device *obd)
         LCONSOLE_INFO("%s: Recovery period 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, max_clients,
-                      max_clients - obd->obd_recoverable_clients,
+                      obd->obd_connected_clients,
                       obd->obd_stale_clients,
                       obd->obd_stale_clients == 1 ? "was" : "were");
 
index d291f40..9f3ae9f 100644 (file)
@@ -1060,7 +1060,6 @@ void class_disconnect_stale_exports(struct obd_device *obd,
 
         CFS_INIT_LIST_HEAD(&work_list);
         spin_lock(&obd->obd_dev_lock);
-        obd->obd_stale_clients = 0;
         list_for_each_safe(pos, n, &obd->obd_exports) {
                 exp = list_entry(pos, struct obd_export, exp_obd_chain);
                 if (exp->exp_replay_needed) {
@@ -1140,6 +1139,7 @@ void class_handle_stale_exports(struct obd_device *obd)
 {
         struct list_head delay_list, evict_list;
         struct obd_export *exp, *n;
+        int delayed = 0;
         ENTRY;
 
         CFS_INIT_LIST_HEAD(&delay_list);
@@ -1152,16 +1152,20 @@ void class_handle_stale_exports(struct obd_device *obd)
                         continue;
                 /* connected non-vbr clients are evicted */
                 if (exp->exp_in_recovery && !exp_connect_vbr(exp)) {
+                        obd->obd_stale_clients++;
                         list_move_tail(&exp->exp_obd_chain, &evict_list);
                         continue;
                 }
-                if (obd->obd_version_recov || !exp->exp_in_recovery)
+                if (obd->obd_version_recov || !exp->exp_in_recovery) {
                         list_move_tail(&exp->exp_obd_chain, &delay_list);
+                        delayed++;
+                }
         }
 #ifndef HAVE_DELAYED_RECOVERY
         /* delayed recovery is turned off, evict all delayed exports */
         list_splice_init(&delay_list, &evict_list);
         list_splice_init(&obd->obd_delayed_exports, &evict_list);
+        obd->obd_stale_clients += delayed;
 #endif
         spin_unlock(&obd->obd_dev_lock);