]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
MonMap: Remove pick_mon() and last_mon data member -- doesn't belong here
authorGreg Farnum <gregf@hq.newdream.net>
Mon, 12 Oct 2009 18:29:05 +0000 (11:29 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Mon, 12 Oct 2009 18:29:05 +0000 (11:29 -0700)
src/mon/MonMap.h

index 185cb2a5d863e7a04d6667672c870caa889c04dd..8125a848fdc4f9f570993aacfa417c3e0e1afbc3 100644 (file)
@@ -29,9 +29,7 @@ class MonMap {
   utime_t last_changed;
   utime_t created;
 
-  int       last_mon;    // last mon i talked to
-
-  MonMap() : epoch(0), last_mon(-1) {
+  MonMap() : epoch(0) {
     memset(&fsid, 0, sizeof(fsid));
     last_changed = created = g_clock.now();
   }
@@ -72,15 +70,6 @@ class MonMap {
     return false;
   }
 
-  // pick a mon.  
-  // choice should be stable, unless we explicitly ask for a new one.
-  int pick_mon(bool newmon=false) { 
-    if (newmon || (last_mon < 0)) {
-      last_mon = rand() % mon_inst.size();
-    }
-    return last_mon;    
-  }
-
   const entity_inst_t &get_inst(unsigned m) {
     assert(m < mon_inst.size());
     return mon_inst[m];