bool client_must_resend = true; //!creq->can_forward();
// tell the client where it should go
- auto f = MClientRequestForward::ref(new MClientRequestForward(m->get_tid(), mds, m->get_num_fwd()+1, client_must_resend), false);
+ MClientRequestForward::ref f(new MClientRequestForward(m->get_tid(), mds, m->get_num_fwd()+1, client_must_resend), false);
messenger->send_message(f.detach(), m->get_source_inst());
}
-void MDSRank::forward_message_mds(const MInterMDS::const_ref& m, mds_rank_t mds)
-{
- assert(mds != whoami);
-
- if (m->is_forwardable()) {
- send_message_mds(m->forwardable(), mds);
- }
-}
-
void MDSRank::send_message_client_counted(const Message::ref& m, client_t client)
{
Session *session = sessionmap.get_session(entity_name_t::CLIENT(client.v));
#include "common/TrackedOp.h"
#include "messages/MClientRequest.h"
-#include "messages/MInterMDS.h"
#include "messages/MCommand.h"
#include "messages/MMDSMap.h"
send_message_mds(mr, mds);
}
void forward_message_mds(const MClientRequest::const_ref& req, mds_rank_t mds);
- void forward_message_mds(const MInterMDS::const_ref& req, mds_rank_t mds);
void send_message_client_counted(const Message::ref& m, client_t client);
void send_message_client_counted(Message* m, client_t client) {
#ifndef CEPH_MDIRUPDATE_H
#define CEPH_MDIRUPDATE_H
-#include "MInterMDS.h"
+#include "msg/Message.h"
-class MDirUpdate : public MInterMDS {
+class MDirUpdate : public Message {
public:
typedef boost::intrusive_ptr<MDirUpdate> ref;
typedef boost::intrusive_ptr<MDirUpdate const> const_ref;
- MDirUpdate() : MInterMDS(MSG_MDS_DIRUPDATE) {}
+ MDirUpdate() : Message(MSG_MDS_DIRUPDATE) {}
MDirUpdate(mds_rank_t f,
dirfrag_t dirfrag,
int dir_rep,
const std::set<int32_t>& dir_rep_by,
filepath& path,
bool discover = false) :
- MInterMDS(MSG_MDS_DIRUPDATE), from_mds(f), dirfrag(dirfrag),
+ Message(MSG_MDS_DIRUPDATE), from_mds(f), dirfrag(dirfrag),
dir_rep(dir_rep), dir_rep_by(dir_rep_by), path(path) {
this->discover = discover ? 5 : 0;
}
encode(path, payload);
}
- bool is_forwardable() const override {
- return true;
- }
-
- MInterMDS::ref forwardable() const override {
- MDirUpdate::ref m(new MDirUpdate(*this), false);
- return m;
- }
-
protected:
~MDirUpdate() {}
MDirUpdate(const MDirUpdate& m)
- : MInterMDS(MSG_MDS_DIRUPDATE),
+ : Message(MSG_MDS_DIRUPDATE),
from_mds(m.from_mds),
dirfrag(m.dirfrag),
dir_rep(m.dir_rep),
+++ /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) 2018 Red Hat, Inc.
- *
- * 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 CEPH_MINTERMDS_H
-#define CEPH_MINTERMDS_H
-
-#include "include/types.h"
-#include "include/fs_types.h"
-
-#include "msg/Message.h"
-
-class MInterMDS : public Message {
-public:
- typedef boost::intrusive_ptr<MInterMDS> ref;
- typedef boost::intrusive_ptr<MInterMDS const> const_ref;
-
- template <typename... T>
- MInterMDS(T&&... args) : Message(std::forward<T>(args)...) {}
-
- virtual bool is_forwardable() const { return false; }
-
- // N.B. only some types of messages we should be 'forwarding'; they
- // explicitly encode their source mds, which gets clobbered when resent
- virtual MInterMDS::ref forwardable() const {ceph_abort();}
-
-protected:
- virtual ~MInterMDS() {}
-};
-
-#endif