//if (*it == except) continue;
dout(7) << "sending dir_update on " << *dir << " to " << *it << dendl;
- mds->send_message_mds(new MDirUpdate(dir->dirfrag(),
+ mds->send_message_mds(new MDirUpdate(mds->get_nodeid(),
+ dir->dirfrag(),
dir->dir_rep,
dir->dir_rep_by,
path,
#include "msg/Message.h"
class MDirUpdate : public Message {
+ int32_t from_mds;
dirfrag_t dirfrag;
int32_t dir_rep;
int32_t discover;
filepath path;
public:
+ int get_source_mds() { return from_mds; }
dirfrag_t get_dirfrag() { return dirfrag; }
int get_dir_rep() { return dir_rep; }
set<int>& get_dir_rep_by() { return dir_rep_by; }
}
MDirUpdate() {}
- MDirUpdate(dirfrag_t dirfrag,
+ MDirUpdate(int f,
+ dirfrag_t dirfrag,
int dir_rep,
set<int>& dir_rep_by,
filepath& path,
bool discover = false) :
Message(MSG_MDS_DIRUPDATE) {
+ this->from_mds = f;
this->dirfrag = dirfrag;
this->dir_rep = dir_rep;
this->dir_rep_by = dir_rep_by;
virtual void decode_payload() {
bufferlist::iterator p = payload.begin();
+ ::decode(from_mds, p);
::decode(dirfrag, p);
::decode(dir_rep, p);
::decode(discover, p);
}
virtual void encode_payload() {
+ ::encode(from_mds, payload);
::encode(dirfrag, payload);
::encode(dir_rep, payload);
::encode(discover, payload);