]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: services: use mon->send_reply(op,...) instead
authorJoao Eduardo Luis <joao@suse.de>
Wed, 17 Jun 2015 11:59:34 +0000 (12:59 +0100)
committerJoao Eduardo Luis <joao@suse.de>
Thu, 16 Jul 2015 17:06:08 +0000 (18:06 +0100)
We are replying to operations, not messages, so use the appropriate
function to do so (and mark events).

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
src/mon/AuthMonitor.cc
src/mon/LogMonitor.cc
src/mon/MDSMonitor.cc
src/mon/OSDMonitor.cc
src/mon/PGMonitor.cc

index a82dbb71f0cbb7d29f5d5c99fa4a75aedcdcd94e..fb6c753787ff1c21e62374685d9af0dbed0bbc3c 100644 (file)
@@ -509,7 +509,7 @@ bool AuthMonitor::prep_auth(MonOpRequestRef op, bool paxos_writable)
 
 reply:
   reply = new MAuthReply(proto, &response_bl, ret, s->global_id);
-  mon->send_reply(m, reply);
+  mon->send_reply(op, reply);
 done:
   s->put();
   return true;
index b7e338e49995eb1d24a41ce9d383c4949ebc6957..2d2c48d91d586268bf492b8819dfe946504c63ca 100644 (file)
@@ -356,7 +356,7 @@ void LogMonitor::_updated_log(MonOpRequestRef op)
 {
   MLog *m = static_cast<MLog*>(op->get_req());
   dout(7) << "_updated_log for " << m->get_orig_source_inst() << dendl;
-  mon->send_reply(m, new MLogAck(m->fsid, m->entries.rbegin()->seq));
+  mon->send_reply(op, new MLogAck(m->fsid, m->entries.rbegin()->seq));
 }
 
 bool LogMonitor::should_propose(double& delay)
index 3de78d67a2e1c992693420cbf8c23c1e1d8bc1fb..68bd912a47fba387e456b7ade713d613205d9bbf 100644 (file)
@@ -296,7 +296,7 @@ bool MDSMonitor::preprocess_beacon(MonOpRequestRef op)
   if (pending_mdsmap.is_dne_gid(gid)) {
     if (state != MDSMap::STATE_BOOT) {
       dout(7) << "mds_beacon " << *m << " is not in mdsmap" << dendl;
-      mon->send_reply(m, new MMDSMap(mon->monmap->fsid, &mdsmap));
+      mon->send_reply(op, new MMDSMap(mon->monmap->fsid, &mdsmap));
       return true;
     } else {
       return false;  // not booted yet.
@@ -361,7 +361,7 @@ bool MDSMonitor::preprocess_beacon(MonOpRequestRef op)
  reply:
   // note time and reply
   _note_beacon(m);
-  mon->send_reply(m,
+  mon->send_reply(op,
                  new MMDSBeacon(mon->monmap->fsid, m->get_global_id(), m->get_name(),
                                 mdsmap.get_epoch(), state, seq));
   return true;
@@ -585,7 +585,7 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
       pending_mdsmap.mds_info.erase(gid);
 
       // Respond to MDS, so that it knows it can continue to shut down
-      mon->send_reply(m, new MMDSBeacon(mon->monmap->fsid, m->get_global_id(),
+      mon->send_reply(op, new MMDSBeacon(mon->monmap->fsid, m->get_global_id(),
                     m->get_name(), mdsmap.get_epoch(), state, seq));
     } else if (state == MDSMap::STATE_DNE) {
       if (!mon->osdmon()->is_writeable()) {
@@ -600,7 +600,7 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
       request_proposal(mon->osdmon());
 
       // Respond to MDS, so that it knows it can continue to shut down
-      mon->send_reply(m, new MMDSBeacon(mon->monmap->fsid, m->get_global_id(),
+      mon->send_reply(op, new MMDSBeacon(mon->monmap->fsid, m->get_global_id(),
                     m->get_name(), mdsmap.get_epoch(), state, seq));
     } else {
       info.state = state;
@@ -644,9 +644,9 @@ void MDSMonitor::_updated(MonOpRequestRef op)
 
   if (m->get_state() == MDSMap::STATE_STOPPED) {
     // send the map manually (they're out of the map, so they won't get it automatic)
-    mon->send_reply(m, new MMDSMap(mon->monmap->fsid, &mdsmap));
+    mon->send_reply(op, new MMDSMap(mon->monmap->fsid, &mdsmap));
   } else {
-    mon->send_reply(m, new MMDSBeacon(mon->monmap->fsid,
+    mon->send_reply(op, new MMDSBeacon(mon->monmap->fsid,
                                      m->get_global_id(),
                                      m->get_name(),
                                      mdsmap.get_epoch(),
index 5b4740f39f52a58efdbbc3c9afd0e1c2cae1e69a..3b43cc8eb23d42d97c24e26a9d2f93839ce21417 100644 (file)
@@ -1371,7 +1371,7 @@ bool OSDMonitor::preprocess_get_osdmap(MonOpRequestRef op)
   }
   reply->oldest_map = get_first_committed();
   reply->newest_map = osdmap.get_epoch();
-  mon->send_reply(m, reply);
+  mon->send_reply(op, reply);
   return true;
 }
 
@@ -1470,7 +1470,7 @@ public:
   void _finish(int) {
     MOSDMarkMeDown *m = static_cast<MOSDMarkMeDown*>(op->get_req());
     osdmon->mon->send_reply(
-      m,
+      op,
       new MOSDMarkMeDown(
        m->fsid,
        m->get_target(),
@@ -7519,5 +7519,5 @@ void OSDMonitor::_pool_op_reply(MonOpRequestRef op,
   dout(20) << "_pool_op_reply " << ret << dendl;
   MPoolOpReply *reply = new MPoolOpReply(m->fsid, m->get_tid(),
                                         ret, epoch, get_last_committed(), blp);
-  mon->send_reply(m, reply);
+  mon->send_reply(op, reply);
 }
index fe464bf1b453794ea81f04e867ba558b6281e6c1..528ad6d024753bfd9e50bc642727981c482010c7 100644 (file)
@@ -647,7 +647,7 @@ void PGMonitor::handle_statfs(MonOpRequestRef op)
   reply->h.st.num_objects = pg_map.pg_sum.stats.sum.num_objects;
 
   // reply
-  mon->send_reply(statfs, reply);
+  mon->send_reply(op, reply);
 }
 
 bool PGMonitor::preprocess_getpoolstats(MonOpRequestRef op)
@@ -682,7 +682,7 @@ bool PGMonitor::preprocess_getpoolstats(MonOpRequestRef op)
     reply->pool_stats[*p] = pg_map.pg_pool_sum[poolid];
   }
 
-  mon->send_reply(m, reply);
+  mon->send_reply(op, reply);
 
  out:
   return true;
@@ -769,7 +769,7 @@ bool PGMonitor::prepare_pg_stats(MonOpRequestRef op)
         ++p) {
       ack->pg_stat[p->first] = make_pair(p->second.reported_seq, p->second.reported_epoch);
     }
-    mon->send_reply(stats, ack);
+    mon->send_reply(op, ack);
     return false;
   }
 
@@ -838,10 +838,10 @@ bool PGMonitor::prepare_pg_stats(MonOpRequestRef op)
 
 void PGMonitor::_updated_stats(MonOpRequestRef op, MonOpRequestRef ack_op)
 {
-  MPGStats *req = static_cast<MPGStats*>(op->get_req());
   MPGStats *ack = static_cast<MPGStats*>(ack_op->get_req());
-  dout(7) << "_updated_stats for " << req->get_orig_source_inst() << dendl;
-  mon->send_reply(req, ack);
+  dout(7) << "_updated_stats for "
+          << op->get_req()->get_orig_source_inst() << dendl;
+  mon->send_reply(op, ack);
 }