messages/MOSDAlive.h\
messages/MOSDBoot.h\
messages/MOSDFailure.h\
- messages/MOSDGetMap.h\
messages/MOSDIn.h\
messages/MOSDMap.h\
messages/MOSDOp.h\
- kill mon->osd
- kill shutdown msg
+ - route send_full/send_latest...
- kill mon->mds
- beacon reply
- kill shutdown msg
#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
+++ /dev/null
-// -*- 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
// ------------------------
// 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)
{
break;
// OSDs
- case CEPH_MSG_OSD_GETMAP:
case MSG_OSD_FAILURE:
case MSG_OSD_BOOT:
case MSG_OSD_IN:
#include "messages/MOSDFailure.h"
#include "messages/MOSDMap.h"
-#include "messages/MOSDGetMap.h"
#include "messages/MOSDBoot.h"
#include "messages/MOSDAlive.h"
#include "messages/MPoolOp.h"
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);
// ---------------------------
// 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
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);
#include "messages/MOSDSubOp.h"
#include "messages/MOSDSubOpReply.h"
#include "messages/MOSDMap.h"
-#include "messages/MOSDGetMap.h"
#include "messages/MOSDPGNotify.h"
#include "messages/MOSDPGQuery.h"
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;