]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: OSDMonitor sends maps over connection
authorCasey Bodley <casey@linuxbox.com>
Tue, 9 Sep 2014 17:36:37 +0000 (13:36 -0400)
committerMatt Benjamin <matt@cohortfs.com>
Wed, 14 Jan 2015 21:40:39 +0000 (16:40 -0500)
Signed-off-by: Casey Bodley <casey@linuxbox.com>
Signed-off-by: Matt Benjamin <matt@cohortfs.com>
src/mon/OSDMonitor.cc
src/mon/OSDMonitor.h

index 97ed96e9d2b970b232b22c8fbe34da0a1066b4d3..f2d4b3e67da43780fc3dd56b6d3932f599660abb 100644 (file)
@@ -1889,10 +1889,11 @@ void OSDMonitor::send_incremental(PaxosServiceMessage *req, epoch_t first)
     osd_epoch[osd] = last;
 }
 
-void OSDMonitor::send_incremental(epoch_t first, entity_inst_t& dest, bool onetime)
+void OSDMonitor::send_incremental(epoch_t first, MonSession *session,
+                                 bool onetime)
 {
   dout(5) << "send_incremental [" << first << ".." << osdmap.get_epoch() << "]"
-         << " to " << dest << dendl;
+         << " to " << session->inst << dendl;
 
   if (first < get_first_committed()) {
     first = get_first_committed();
@@ -1908,14 +1909,14 @@ void OSDMonitor::send_incremental(epoch_t first, entity_inst_t& dest, bool oneti
     m->oldest_map = first;
     m->newest_map = osdmap.get_epoch();
     m->maps[first] = bl;
-    mon->messenger->send_message(m, dest);
+    session->con->send_message(m);
     first++;
   }
 
   while (first <= osdmap.get_epoch()) {
     epoch_t last = MIN(first + g_conf->osd_map_message_max, osdmap.get_epoch());
     MOSDMap *m = build_incremental(first, last);
-    mon->messenger->send_message(m, dest);
+    session->con->send_message(m);
     first = last + 1;
     if (onetime)
       break;
@@ -1953,7 +1954,7 @@ void OSDMonitor::check_sub(Subscription *sub)
           << (sub->onetime ? " (onetime)":" (ongoing)") << dendl;
   if (sub->next <= osdmap.get_epoch()) {
     if (sub->next >= 1)
-      send_incremental(sub->next, sub->session->inst, sub->incremental_onetime);
+      send_incremental(sub->next, sub->session, sub->incremental_onetime);
     else
       sub->session->con->send_message(build_latest_full());
     if (sub->onetime)
index 3f9d578e4adb644030f392a515217e41b82381ba..fa45ab98581145ed458b23601f0b497a96f03c77 100644 (file)
@@ -217,7 +217,7 @@ private:
   MOSDMap *build_incremental(epoch_t first, epoch_t last);
   void send_full(PaxosServiceMessage *m);
   void send_incremental(PaxosServiceMessage *m, epoch_t first);
-  void send_incremental(epoch_t first, entity_inst_t& dest, bool onetime);
+  void send_incremental(epoch_t first, MonSession *session, bool onetime);
 
   int reweight_by_utilization(int oload, std::string& out_str, bool by_pg,
                              const set<int64_t> *pools);