]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
MDS: rename replay Contexts -- they were ambiguous at best.
authorGreg Farnum <gregf@hq.newdream.net>
Mon, 20 Dec 2010 21:10:44 +0000 (13:10 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Thu, 6 Jan 2011 19:12:14 +0000 (11:12 -0800)
Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
src/mds/MDS.cc
src/mds/MDS.h

index 283bd38980f9092096d92349455a2f72f86a45cb..be52c82a03aae35791e47b39955a484b77cbe1dd 100644 (file)
@@ -1229,19 +1229,18 @@ void MDS::replay_start()
 }
 
 
-class MDS::C_MDS_RestartReplay : public Context {
+class MDS::C_MDS_StandbyReplayRestartFinish : public Context {
   MDS *mds;
   uint64_t old_read_pos;
 public:
-  C_MDS_RestartReplay(MDS *mds_, uint64_t old_read_pos_) :
+  C_MDS_StandbyReplayRestartFinish(MDS *mds_, uint64_t old_read_pos_) :
     mds(mds_), old_read_pos(old_read_pos_) {}
   void finish(int r) {
     if (old_read_pos < mds->mdlog->get_journaler()->get_trimmed_pos()) {
       cerr << "standby MDS fell behind active MDS journal's expire_pos, restarting" << std::endl;
       mds->respawn(); /* we're too far back, and this is easier than
                          trying to reset everything in the cache, etc */
-    }
-    else {
+    } else {
       mds->boot_start(3, r);
     }
   }
@@ -1250,13 +1249,13 @@ public:
 inline void MDS::standby_replay_restart()
 {
   mdlog->get_journaler()->reread_head_and_probe(
-      new C_MDS_RestartReplay(this, mdlog->get_journaler()->get_read_pos()));
+      new C_MDS_StandbyReplayRestartFinish(this, mdlog->get_journaler()->get_read_pos()));
 }
 
-class MDS::C_Standby_replay_start : public Context {
+class MDS::C_MDS_StandbyReplayRestart : public Context {
   MDS *mds;
 public:
-  C_Standby_replay_start(MDS *m) : mds(m) {}
+  C_MDS_StandbyReplayRestart(MDS *m) : mds(m) {}
   void finish(int r) {
     assert(!r);
     mds->standby_replay_restart();
@@ -1279,7 +1278,7 @@ void MDS::replay_done()
     standby_trim_segments();
     dout(10) << "setting replay timer" << dendl;
     timer.add_event_after(g_conf.mds_replay_interval,
-                          new C_Standby_replay_start(this));
+                          new C_MDS_StandbyReplayRestart(this));
     return;
   }
 
index ee919a33d8aead6fdb3659c09cd1ab9c8b47aecf..fc517502bd6724a6e8a5fb809069e164f7e0f05c 100644 (file)
@@ -360,8 +360,8 @@ class MDS : public Dispatcher {
   void replay_done();
   void standby_replay_restart();
   void standby_trim_segments();
-  class C_Standby_replay_start;
-  class C_MDS_RestartReplay;
+  class C_MDS_StandbyReplayRestart;
+  class C_MDS_StandbyReplayRestartFinish;
 
   void resolve_start();
   void resolve_done();