]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: finish table servers recovery after creating newfs 1645/head
authorYan, Zheng <zheng.z.yan@intel.com>
Fri, 11 Apr 2014 01:43:59 +0000 (09:43 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Fri, 11 Apr 2014 01:57:29 +0000 (09:57 +0800)
Fixes: #8054
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/MDS.cc
src/mds/MDS.h

index 2473ff0eb1fdacb71266aa8fddd577e3bac70ad6..b4cce0824c6aab98797a0cc15b8a7a780a512293 100644 (file)
@@ -994,9 +994,10 @@ void MDS::handle_mds_map(MMDSMap *m)
     } else {
       // did i just recover?
       if ((is_active() || is_clientreplay()) &&
-          (oldstate == MDSMap::STATE_REJOIN ||
+          (oldstate == MDSMap::STATE_CREATING ||
+          oldstate == MDSMap::STATE_REJOIN ||
           oldstate == MDSMap::STATE_RECONNECT))
-        recovery_done();
+        recovery_done(oldstate);
 
       if (is_active()) {
         active_start();
@@ -1564,7 +1565,7 @@ void MDS::active_start()
   finish_contexts(g_ceph_context, waiting_for_active);  // kick waiters
 }
 
-void MDS::recovery_done()
+void MDS::recovery_done(int oldstate)
 {
   dout(1) << "recovery_done -- successful recovery!" << dendl;
   assert(is_clientreplay() || is_active());
@@ -1579,6 +1580,9 @@ void MDS::recovery_done()
     snapserver->finish_recovery(active);
   }
 
+  if (oldstate == MDSMap::STATE_CREATING)
+    return;
+
   mdcache->start_recovered_truncates();
   mdcache->do_file_recover();
 
index a1e1c58c83f996ef3c2e1ff87757b7b9dc880a9b..1cd6096b46d13af367328ec65f0d4900bc4905b6 100644 (file)
@@ -389,7 +389,7 @@ class MDS : public Dispatcher {
   void rejoin_joint_start();
   void rejoin_start();
   void rejoin_done();
-  void recovery_done();
+  void recovery_done(int oldstate);
   void clientreplay_start();
   void clientreplay_done();
   void active_start();