MOSDMap: reencode full map embedded in Incremental, as needed

The Incremental may have a bufferlist containing a full map; reencode
that too if we are reencoding for old clients.

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2011-10-25 10:51:21 -07:00
parent 90f0429f8b
commit 72e0ca0261

View File

@ -93,6 +93,13 @@ public:
bufferlist::iterator q = p->second.begin();
inc.decode(q);
p->second.clear();
if (inc.fullmap.length()) {
// embedded full map?
OSDMap m;
m.decode(inc.fullmap);
inc.fullmap.clear();
m.encode(inc.fullmap, connection->get_features());
}
inc.encode(p->second, connection->get_features());
}
for (map<epoch_t,bufferlist>::iterator p = maps.begin();