It is very dangerous to reencode and OSDMap with fewer features than the
mon intended as we may be introducing a different variation of the same
OSDMap epoch into the wild. Add a build warning here as well as this is
a potentially serious problem.
Signed-off-by: Sage Weil <sage@redhat.com>
if (o->test_flag(CEPH_OSDMAP_FULL))
last_marked_full = e;
+#warning FIXME: we are unsafely encoding a new full OSDMap
+ if (inc.encode_features & ~CEPH_FEATURES_ALL)
+ derr << "WARNING: encoding full OSDMap with fewer features than the mon"
+ << dendl;
+
bufferlist fbl;
o->encode(fbl);