osdmap: successfully decode short map

When we send (old) maps to the kclient, we omit the extended section.  Lets
decode those (old, abbreviated maps) successfully, too.

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2012-02-20 10:56:25 -08:00
parent f3020c4ae7
commit f3a273a657

View File

@ -243,6 +243,10 @@ void OSDMap::Incremental::decode(bufferlist::iterator &p)
::decode(new_pg_temp, p);
}
// decode short map, too.
if (v == 5 && p.end())
return;
// extended
__u16 ev = 0;
if (v >= 5)