newmap.created = newmap.modified = ceph_clock_now(g_ceph_context);
// encode into pending incremental
- newmap.encode(pending_inc.fullmap, mon->quorum_features);
+ newmap.encode(pending_inc.fullmap, mon->quorum_features | CEPH_FEATURE_RESERVED);
}
void OSDMonitor::update_from_paxos(bool *need_bootstrap)
if (!f)
f = -1;
bufferlist full_bl;
- osdmap.encode(full_bl, f);
+ osdmap.encode(full_bl, f | CEPH_FEATURE_RESERVED);
tx_size += full_bl.length();
put_version_full(t, osdmap.epoch, full_bl);
// encode
assert(get_last_committed() + 1 == pending_inc.epoch);
- ::encode(pending_inc, bl, mon->quorum_features);
+ ::encode(pending_inc, bl, mon->quorum_features | CEPH_FEATURE_RESERVED);
/* put everything in the transaction */
put_version(t, pending_inc.epoch, bl);
<< dendl;
bufferlist fbl;
- o->encode(fbl);
+ o->encode(fbl, inc.encode_features | CEPH_FEATURE_RESERVED);
hobject_t fulloid = get_osdmap_pobject_name(e);
t.write(META_COLL, fulloid, 0, fbl.length(), fbl);
return;
}
+ // only a select set of callers should *ever* be encoding new
+ // OSDMaps. others should be passing around the canonical encoded
+ // buffers from on high. select out those callers by passing in an
+ // "impossible" feature bit.
+ assert(features & CEPH_FEATURE_RESERVED);
+ features &= ~CEPH_FEATURE_RESERVED;
+
// meta-encoding: how we include client-used and osd-specific data
ENCODE_START(7, 7, bl);
encode_classic(bl, features);
return;
}
+
+ // only a select set of callers should *ever* be encoding new
+ // OSDMaps. others should be passing around the canonical encoded
+ // buffers from on high. select out those callers by passing in an
+ // "impossible" feature bit.
+ assert(features & CEPH_FEATURE_RESERVED);
+ features &= ~CEPH_FEATURE_RESERVED;
+
// meta-encoding: how we include client-used and osd-specific data
ENCODE_START(7, 7, bl);
usage(cerr);
exit(1);
}
- den->encode(encbl, features);
+ den->encode(encbl, features | CEPH_FEATURE_RESERVED); // hack for OSDMap
} else if (*i == string("decode")) {
if (!den) {
cerr << "must first select type with 'type <name>'" << std::endl;