Do not reencode; use our existing encoded bufferlist.
Signed-off-by: Sage Weil <sage@redhat.com>
MOSDMap() : Message(CEPH_MSG_OSD_MAP, HEAD_VERSION) { }
- MOSDMap(const uuid_d &f, OSDMap *oc=0)
+ MOSDMap(const uuid_d &f)
: Message(CEPH_MSG_OSD_MAP, HEAD_VERSION),
fsid(f),
- oldest_map(0), newest_map(0) {
- if (oc)
- oc->encode(maps[oc->get_epoch()]);
- }
+ oldest_map(0), newest_map(0) { }
private:
~MOSDMap() {}
MOSDMap *OSDMonitor::build_latest_full()
{
- MOSDMap *r = new MOSDMap(mon->monmap->fsid, &osdmap);
+ MOSDMap *r = new MOSDMap(mon->monmap->fsid);
+ get_version_full(osdmap.get_epoch(), r->maps[osdmap.get_epoch()]);
r->oldest_map = get_first_committed();
r->newest_map = osdmap.get_epoch();
return r;