return;
h = msg->front.iov_base;
h->fsid = monc->monmap->fsid;
- h->want = cpu_to_le32(monc->want_mdsmap);
+ h->have = cpu_to_le64(monc->want_mdsmap - 1);
msg->hdr.dst = monc->monmap->mon_inst[mon];
ceph_msg_send(monc->client->msgr, msg, 0);
}
class MMDSGetMap : public PaxosServiceMessage {
public:
ceph_fsid_t fsid;
- epoch_t want;
MMDSGetMap() : PaxosServiceMessage(CEPH_MSG_MDS_GETMAP, 0) {}
- MMDSGetMap(ceph_fsid_t &f, epoch_t w=0) :
- PaxosServiceMessage(CEPH_MSG_MDS_GETMAP, w-1),
- fsid(f),
- want(w) { }
+ MMDSGetMap(ceph_fsid_t &f, epoch_t have=0) :
+ PaxosServiceMessage(CEPH_MSG_MDS_GETMAP, have),
+ fsid(f) { }
const char *get_type_name() { return "mds_getmap"; }
void print(ostream& out) {
- out << "mds_getmap(want " << want << "v " << version << ")";
+ out << "mds_getmap(have v" << version << ")";
}
void encode_payload() {
paxos_encode();
::encode(fsid, payload);
- ::encode(want, payload);
}
void decode_payload() {
bufferlist::iterator p = payload.begin();
paxos_decode(p);
::decode(fsid, p);
- ::decode(want, p);
}
};
void MDSMonitor::handle_mds_getmap(MMDSGetMap *m)
{
- if (m->want <= mdsmap.get_epoch())
+ if (m->version < mdsmap.get_epoch())
send_full(m->get_orig_source_inst());
else
waiting_for_map.push_back(m->get_orig_source_inst());