]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: use orig_src in clientmon, elsewhere
authorSage Weil <sage@newdream.net>
Thu, 3 Jul 2008 03:37:07 +0000 (20:37 -0700)
committerSage Weil <sage@newdream.net>
Thu, 3 Jul 2008 03:37:07 +0000 (20:37 -0700)
src/mon/ClientMonitor.cc
src/mon/Monitor.cc
src/mon/PaxosService.cc

index 4d876cceff3ce4b9107d7c98ac8471a7436e0bf7..56dfd5fc110da8e284b87b817fd41865e73a9754 100644 (file)
@@ -119,13 +119,13 @@ void ClientMonitor::encode_pending(bufferlist &bl)
 
 bool ClientMonitor::preprocess_query(Message *m)
 {
-  dout(10) << "preprocess_query " << *m << " from " << m->get_source_inst() << dendl;
+  dout(10) << "preprocess_query " << *m << " from " << m->get_orig_source_inst() << dendl;
 
   switch (m->get_type()) {
   case CEPH_MSG_CLIENT_MOUNT:
     {
       // already mounted?
-      entity_addr_t addr = m->get_source_addr();
+      entity_addr_t addr = m->get_orig_source_addr();
       if (client_map.addr_client.count(addr)) {
        int client = client_map.addr_client[addr];
        dout(7) << " client" << client << " already mounted" << dendl;
@@ -138,7 +138,7 @@ bool ClientMonitor::preprocess_query(Message *m)
   case CEPH_MSG_CLIENT_UNMOUNT:
     {
       // already unmounted?
-      int client = m->get_source().num();
+      int client = m->get_orig_source().num();
       if (client_map.client_addr.count(client) == 0) {
        dout(7) << " client" << client << " not mounted" << dendl;
        _unmounted((MClientUnmount*)m);
@@ -157,15 +157,15 @@ bool ClientMonitor::preprocess_query(Message *m)
 
 bool ClientMonitor::prepare_update(Message *m)
 {
-  dout(10) << "prepare_update " << *m << " from " << m->get_source_inst() << dendl;
+  dout(10) << "prepare_update " << *m << " from " << m->get_orig_source_inst() << dendl;
   
   switch (m->get_type()) {
   case CEPH_MSG_CLIENT_MOUNT:
     {
-      entity_addr_t addr = m->get_source_addr();
+      entity_addr_t addr = m->get_orig_source_addr();
       int client = -1;
-      if (m->get_source().is_client())
-       client = m->get_source().num();
+      if (m->get_orig_source().is_client())
+       client = m->get_orig_source().num();
 
       // choose a client id
       if (client < 0) {
@@ -187,8 +187,8 @@ bool ClientMonitor::prepare_update(Message *m)
 
   case CEPH_MSG_CLIENT_UNMOUNT:
     {
-      assert(m->get_source().is_client());
-      int client = m->get_source().num();
+      assert(m->get_orig_source().is_client());
+      int client = m->get_orig_source().num();
 
       assert(client_map.client_addr.count(client));
       
@@ -212,7 +212,7 @@ bool ClientMonitor::prepare_update(Message *m)
 void ClientMonitor::_mounted(int client, MClientMount *m)
 {
   entity_inst_t to;
-  to.addr = m->get_source_addr();
+  to.addr = m->get_orig_source_addr();
   to.name = entity_name_t::CLIENT(client);
 
   dout(10) << "_mounted client" << client << " at " << to << dendl;
@@ -230,10 +230,10 @@ void ClientMonitor::_mounted(int client, MClientMount *m)
 
 void ClientMonitor::_unmounted(MClientUnmount *m)
 {
-  dout(10) << "_unmounted " << m->get_source_inst() << dendl;
+  dout(10) << "_unmounted " << m->get_orig_source_inst() << dendl;
   
   // reply with (same) unmount message
-  mon->messenger->send_message(m, m->get_source_inst());
+  mon->messenger->send_message(m, m->get_orig_source_inst());
 
   // auto-shutdown?
   // (hack for fakesyn/newsyn, mostly)
index 9b7e464ffcc934efdb517b594cf4171975347103..6ae552ff1a080a45c05b2c7349ba804af46609ca 100644 (file)
@@ -366,7 +366,7 @@ void Monitor::handle_mon_get_map(MMonGetMap *m)
   dout(10) << "handle_mon_get_map" << dendl;
   bufferlist bl;
   monmap->encode(bl);
-  messenger->send_message(new MMonMap(bl), m->get_source_inst());
+  messenger->send_message(new MMonMap(bl), m->get_orig_source_inst());
   delete m;
 }
 
index 1a07a05d87909399f2d8209fa3008ef7972542de..b931c0b269af752fba2ab2d85890a34aed149217 100644 (file)
@@ -31,7 +31,7 @@ const char *PaxosService::get_machine_name()
 
 void PaxosService::dispatch(Message *m)
 {
-  dout(10) << "dispatch " << *m << " from " << m->get_source_inst() << dendl;
+  dout(10) << "dispatch " << *m << " from " << m->get_orig_source_inst() << dendl;
   
   // make sure our map is readable and up to date
   if (!paxos->is_readable()) {