]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: kill unused MOSDGetMap
authorSage Weil <sage@newdream.net>
Sat, 10 Oct 2009 04:55:44 +0000 (21:55 -0700)
committerSage Weil <sage@newdream.net>
Sat, 10 Oct 2009 04:55:44 +0000 (21:55 -0700)
Yay

src/Makefile.am
src/TODO
src/include/ceph_fs.h
src/messages/MOSDGetMap.h [deleted file]
src/mon/Monitor.cc
src/mon/OSDMonitor.cc
src/mon/OSDMonitor.h
src/msg/Message.cc

index 837058fd05fb1ca524ad05afae9a11634dca5993..d2bd25016a9c6faff4aa4c3e742bc6150658792c 100644 (file)
@@ -576,7 +576,6 @@ noinst_HEADERS = \
         messages/MOSDAlive.h\
         messages/MOSDBoot.h\
         messages/MOSDFailure.h\
-        messages/MOSDGetMap.h\
         messages/MOSDIn.h\
         messages/MOSDMap.h\
         messages/MOSDOp.h\
index 6226afa523053b0e5a1c7219783c65ada498c754..9b000318971c7d4b31f0892bc10bcbf3c6c1401a 100644 (file)
--- a/src/TODO
+++ b/src/TODO
@@ -45,6 +45,7 @@ v0.17
 
 - kill mon->osd
   - kill shutdown msg
+  - route send_full/send_latest...
 - kill mon->mds
   - beacon reply
   - kill shutdown msg
index 64ef06fadb45b7a5177e7aee4810ad79bcda736d..56af192cb430d448b211647f791025312bb3fe62 100644 (file)
@@ -114,7 +114,6 @@ int ceph_file_layout_is_valid(const struct ceph_file_layout *layout);
 #define CEPH_MSG_CLIENT_CAPRELEASE      0x313
 
 /* osd */
-#define CEPH_MSG_OSD_GETMAP       40
 #define CEPH_MSG_OSD_MAP          41
 #define CEPH_MSG_OSD_OP           42
 #define CEPH_MSG_OSD_OPREPLY      43
diff --git a/src/messages/MOSDGetMap.h b/src/messages/MOSDGetMap.h
deleted file mode 100644 (file)
index eb29e6c..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software 
- * Foundation.  See file COPYING.
- * 
- */
-
-#ifndef __MOSDGETMAP_H
-#define __MOSDGETMAP_H
-
-#include "messages/PaxosServiceMessage.h"
-
-#include "include/types.h"
-
-class MOSDGetMap : public PaxosServiceMessage {
- public:
-  ceph_fsid_t fsid;
-  epoch_t start;  // this is the first incremental the sender wants (he has start-1)
-
-  MOSDGetMap() : PaxosServiceMessage(CEPH_MSG_OSD_GETMAP, 0) {}
-  MOSDGetMap(const ceph_fsid_t& f, epoch_t s=0) : 
-    PaxosServiceMessage(CEPH_MSG_OSD_GETMAP, s>0 ? s-1 : 0),
-    fsid(f), start(s) { }
-
-  epoch_t get_start_epoch() { return start; }
-
-  const char *get_type_name() { return "get_osd_map"; }
-  void print(ostream& out) {
-    out << "get_osd_map(start " << start << ")";
-  }
-  
-  void encode_payload() {
-    paxos_encode();
-    ::encode(fsid, payload);
-    ::encode(start, payload);
-  }
-  void decode_payload() {
-    bufferlist::iterator p = payload.begin();
-    paxos_decode(p);
-    ::decode(fsid, p);
-    ::decode(start, p);
-  }
-};
-
-#endif
index ca18c9344c8b881f12d49f738c4f84d52487e8ae..497be13d0e387b408d1f8f465cf3e66fc8a8cb35 100644 (file)
@@ -321,6 +321,11 @@ void Monitor::reply_command(MMonCommand *m, int rc, const string &rs, bufferlist
 
 // ------------------------
 // request/reply routing
+//
+// a client/mds/osd will connect to a random monitor.  we need to forward any
+// messages requiring state updates to the leader, and then route any replies
+// back via the correct monitor and back to them.  (the monitor will not
+// initiate any connections.)
 
 void Monitor::forward_request_leader(PaxosServiceMessage *req)
 {
@@ -508,7 +513,6 @@ bool Monitor::ms_dispatch(Message *m)
       break;
 
       // OSDs
-    case CEPH_MSG_OSD_GETMAP:
     case MSG_OSD_FAILURE:
     case MSG_OSD_BOOT:
     case MSG_OSD_IN:
index d447bb32caf71353ea2d6ac52b468e96abb9947d..cdf655dbae2f96b3455b929bc890a7dd41978bcd 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "messages/MOSDFailure.h"
 #include "messages/MOSDMap.h"
-#include "messages/MOSDGetMap.h"
 #include "messages/MOSDBoot.h"
 #include "messages/MOSDAlive.h"
 #include "messages/MPoolOp.h"
@@ -196,10 +195,6 @@ bool OSDMonitor::preprocess_query(PaxosServiceMessage *m)
 
   switch (m->get_type()) {
     // READs
-  case CEPH_MSG_OSD_GETMAP:
-    handle_osd_getmap((MOSDGetMap*)m);
-    return true;
-    
   case MSG_MON_COMMAND:
     return preprocess_command((MMonCommand*)m);
 
@@ -291,28 +286,6 @@ bool OSDMonitor::should_propose(double& delay)
 // ---------------------------
 // READs
 
-void OSDMonitor::handle_osd_getmap(MOSDGetMap *m)
-{
-  dout(7) << "handle_osd_getmap from " << m->get_orig_source()
-         << " start " << m->get_start_epoch()
-         << dendl;
-  
-  if (ceph_fsid_compare(&m->fsid, &mon->monmap->fsid)) {
-    dout(0) << "handle_osd_getmap on fsid " << m->fsid << " != " << mon->monmap->fsid << dendl;
-    goto out;
-  }
-
-  if (m->get_start_epoch()) {
-    if (m->get_start_epoch() <= osdmap.get_epoch())
-       send_incremental(m->get_orig_source_inst(), m->get_start_epoch());
-    else
-      waiting_for_map[m->get_orig_source_inst()] = m->get_start_epoch();
-  } else
-    send_full(m->get_orig_source_inst());
-  
- out:
-  delete m;
-}
 
 // ---------------------------
 // UPDATEs
index 1642c84d1b512cc5ce0db01ad9fd50b18b7c0f2e..de14223884adc2ff374b06e49deb8a443de56087 100644 (file)
@@ -68,8 +68,6 @@ private:
   void send_full(entity_inst_t dest);
   void send_incremental(entity_inst_t dest, epoch_t since);
  
-  void handle_osd_getmap(class MOSDGetMap *m);
-
   bool preprocess_failure(class MOSDFailure *m);
   bool prepare_failure(class MOSDFailure *m);
   void _reported_failure(MOSDFailure *m);
index ebebe2b9d2648511d44b152bacfb0c8b3a8cfbf1..bc17a888c87417dc8b1a56d2b5e00ce4913faad4 100644 (file)
@@ -50,7 +50,6 @@ using namespace std;
 #include "messages/MOSDSubOp.h"
 #include "messages/MOSDSubOpReply.h"
 #include "messages/MOSDMap.h"
-#include "messages/MOSDGetMap.h"
 
 #include "messages/MOSDPGNotify.h"
 #include "messages/MOSDPGQuery.h"
@@ -290,9 +289,6 @@ Message *decode_message(ceph_msg_header& header, ceph_msg_footer& footer,
   case CEPH_MSG_OSD_MAP:
     m = new MOSDMap;
     break;
-  case CEPH_MSG_OSD_GETMAP:
-    m = new MOSDGetMap;
-    break;
 
   case MSG_OSD_PG_NOTIFY:
     m = new MOSDPGNotify;