]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix up variable names to be more clear this is an inclusive range
authorSage Weil <sage@newdream.net>
Thu, 9 Sep 2010 18:09:57 +0000 (11:09 -0700)
committerSage Weil <sage@newdream.net>
Thu, 9 Sep 2010 18:09:57 +0000 (11:09 -0700)
src/mon/OSDMonitor.cc
src/mon/OSDMonitor.h

index e2633156676e2ea27f775c80843bcff20b22edf1..6dfd4a8667d226da6423e2d5f7dd4c681ce1e1ad 100644 (file)
@@ -751,7 +751,7 @@ void OSDMonitor::send_full(PaxosServiceMessage *m)
 
 MOSDMap *OSDMonitor::build_incremental(epoch_t from, epoch_t to)
 {
-  dout(10) << "build_incremental from " << from << " to " << to << dendl;
+  dout(10) << "build_incremental [" << from << ".." << to << "]" << dendl;
   MOSDMap *m = new MOSDMap(mon->monmap->fsid);
   
   for (epoch_t e = to;
@@ -773,23 +773,23 @@ MOSDMap *OSDMonitor::build_incremental(epoch_t from, epoch_t to)
   return m;
 }
 
-void OSDMonitor::send_incremental(PaxosServiceMessage *req, epoch_t from)
+void OSDMonitor::send_incremental(PaxosServiceMessage *req, epoch_t first)
 {
-  dout(5) << "send_incremental from " << from << " -> " << osdmap.get_epoch()
+  dout(5) << "send_incremental [" << first << ".." << osdmap.get_epoch() << "]"
          << " to " << req->get_orig_source_inst() << dendl;
-  MOSDMap *m = build_incremental(from, osdmap.get_epoch());
+  MOSDMap *m = build_incremental(first, osdmap.get_epoch());
   mon->send_reply(req, m);
 }
 
-void OSDMonitor::send_incremental(epoch_t from, entity_inst_t& dest)
+void OSDMonitor::send_incremental(epoch_t first, entity_inst_t& dest)
 {
-  dout(5) << "send_incremental from " << from << " -> " << osdmap.get_epoch()
+  dout(5) << "send_incremental [" << first << ".." << osdmap.get_epoch() << "]"
          << " to " << dest << dendl;
-  while (from <= osdmap.get_epoch()) {
-    epoch_t to = MIN(from + 100, osdmap.get_epoch());
-    MOSDMap *m = build_incremental(from, to);
+  while (first <= osdmap.get_epoch()) {
+    epoch_t last = MIN(first + 100, osdmap.get_epoch());
+    MOSDMap *m = build_incremental(first, last);
     mon->messenger->send_message(m, dest);
-    from = to + 1;
+    first = last + 1;
   }
 }
 
index 0ac005067226b7ed7c403510917687eff8b0cb11..0de8862906fb8a3e01366a96307e7196e6860432 100644 (file)
@@ -66,9 +66,9 @@ private:
   // ...
   void send_to_waiting();     // send current map to waiters.
   void send_full(PaxosServiceMessage *m);
-  MOSDMap *build_incremental(epoch_t from, epoch_t to);
-  void send_incremental(PaxosServiceMessage *m, epoch_t since);
-  void send_incremental(epoch_t from, entity_inst_t& dest);
+  MOSDMap *build_incremental(epoch_t first, epoch_t last);
+  void send_incremental(PaxosServiceMessage *m, epoch_t first);
+  void send_incremental(epoch_t first, entity_inst_t& dest);
 
  
   bool preprocess_failure(class MOSDFailure *m);