::encode(n, bl);
}
::encode(new_up_client, bl, 0);
- ::encode(new_state, bl);
+ {
+ // legacy is map<int32_t,uint8_t>
+ uint32_t n = new_state.size();
+ ::encode(n, bl);
+ for (auto p : new_state) {
+ ::encode(p.first, bl);
+ ::encode((uint8_t)p.second, bl);
+ }
+ }
::encode(new_weight, bl);
// for ::encode(new_pg_temp, bl);
n = new_pg_temp.size();
::encode(new_pool_names, bl);
::encode(old_pools, bl);
::encode(new_up_client, bl, features);
- ::encode(new_state, bl);
+ {
+ uint32_t n = new_state.size();
+ ::encode(n, bl);
+ for (auto p : new_state) {
+ ::encode(p.first, bl);
+ ::encode((uint8_t)p.second, bl);
+ }
+ }
::encode(new_weight, bl);
::encode(new_pg_temp, bl);
ENCODE_START(8, 7, bl);
{
- uint8_t v = 4;
+ uint8_t v = 5;
if (!HAVE_FEATURE(features, SERVER_LUMINOUS)) {
v = 3;
}
::encode(new_pool_names, bl);
::encode(old_pools, bl);
::encode(new_up_client, bl, features);
- ::encode(new_state, bl);
+ if (v >= 5) {
+ ::encode(new_state, bl);
+ } else {
+ uint32_t n = new_state.size();
+ ::encode(n, bl);
+ for (auto p : new_state) {
+ ::encode(p.first, bl);
+ ::encode((uint8_t)p.second, bl);
+ }
+ }
::encode(new_weight, bl);
::encode(new_pg_temp, bl);
::encode(new_primary_temp, bl);
::decode(old_pools, p);
}
::decode(new_up_client, p);
- ::decode(new_state, p);
+ {
+ map<int32_t,uint8_t> ns;
+ ::decode(ns, p);
+ for (auto q : ns) {
+ new_state[q.first] = q.second;
+ }
+ }
::decode(new_weight, p);
if (v < 6) {
return;
}
{
- DECODE_START(4, bl); // client-usable data
+ DECODE_START(5, bl); // client-usable data
::decode(fsid, bl);
::decode(epoch, bl);
::decode(modified, bl);
::decode(new_pool_names, bl);
::decode(old_pools, bl);
::decode(new_up_client, bl);
- ::decode(new_state, bl);
+ if (struct_v >= 5) {
+ ::decode(new_state, bl);
+ } else {
+ map<int32_t,uint8_t> ns;
+ ::decode(ns, bl);
+ for (auto q : ns) {
+ new_state[q.first] = q.second;
+ }
+ }
::decode(new_weight, bl);
::decode(new_pg_temp, bl);
::decode(new_primary_temp, bl);
mempool::osdmap::vector<string> old_erasure_code_profiles;
mempool::osdmap::map<int32_t,entity_addr_t> new_up_client;
mempool::osdmap::map<int32_t,entity_addr_t> new_up_cluster;
- mempool::osdmap::map<int32_t,uint8_t> new_state; // XORed onto previous state.
+ mempool::osdmap::map<int32_t,uint32_t> new_state; // XORed onto previous state.
mempool::osdmap::map<int32_t,uint32_t> new_weight;
mempool::osdmap::map<pg_t,mempool::osdmap::vector<int32_t> > new_pg_temp; // [] to remove
mempool::osdmap::map<pg_t, int32_t> new_primary_temp; // [-1] to remove