]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
OSDMap: add a CEPH_FEATURE_OSDMAP_ENC feature, and use new encoding
authorGreg Farnum <greg@inktank.com>
Thu, 12 Dec 2013 23:35:23 +0000 (15:35 -0800)
committerGreg Farnum <greg@inktank.com>
Thu, 16 Jan 2014 00:33:06 +0000 (16:33 -0800)
commit3d7c69fb0986337dc72e466dc39d93e5ab406062
tree0c3cb6805a2d3023218e6ea1551a8ba9b4f900fa
parent2646d5edb1596a69a648c625d9be05f677bde870
OSDMap: add a CEPH_FEATURE_OSDMAP_ENC feature, and use new encoding

Bring our OSDMap encoding into the modern Ceph world! :) This is
fairly straightforward, but has a few rough edges:
Previously we had a "struct_v" which went at the beginning of the
OSDMap encoding, and then later on an ev "extended version" which
was used to store the more-frequently-changed OSDMap pieces. There
was no size information stored explicitly to let clients skip this,
but osd maps were always encoded into their own bufferlist before
being sent to clients, which had the same effect.
We now use the modern ENCODE_START three times:
1) for the overall OSDMap encoding,
2) for the client-usable portion of the map,
3) for the "extended" portion of the map

This will let us independently rev everything, which may come in
useful if we want to (for instance) add a "monitor" portion to the
map that the OSDs don't care about. It also makes adding new
client information a lot easier since older clients will still
be able to decode the map as a whole.

We may want to merge this OSDMAP_ENC feature with one of the others
we are creating during this cycle, since they're all very closely
related. That will also let us protect more naturally against old
clients getting a map they need to understand but can't (because
we only need the new map features-to-come when used with erasure-encoded
PGs, etc).

Signed-off-by: Greg Farnum <greg@inktank.com>
src/include/ceph_features.h
src/osd/OSDMap.cc
src/osd/OSDMap.h