::encode(new_state, bl);
::encode(new_weight, bl);
::encode(new_pg_temp, bl);
+ ::encode(new_primary_temp, bl);
ENCODE_FINISH(bl); // client-usable data
}
::decode(new_state, bl);
::decode(new_weight, bl);
::decode(new_pg_temp, bl);
+ ::decode(new_primary_temp, bl);
DECODE_FINISH(bl); // client-usable data
}
}
f->close_section();
+ f->open_array_section("primary_temp");
+ for (map<pg_t, int>::const_iterator p = new_primary_temp.begin();
+ p != new_primary_temp.end();
+ ++p) {
+ f->dump_stream("pgid") << p->first;
+ f->dump_int("osd", p->second);
+ }
+ f->close_section(); // primary_temp
+
f->open_array_section("new_up_thru");
for (map<int32_t,uint32_t>::const_iterator p = new_up_thru.begin(); p != new_up_thru.end(); ++p) {
f->open_object_section("osd");
::encode(osd_addrs->client_addr, bl);
::encode(*pg_temp, bl);
+ ::encode(*primary_temp, bl);
// crush
bufferlist cbl;
::decode(osd_addrs->client_addr, bl);
::decode(*pg_temp, bl);
+ ::decode(*primary_temp, bl);
// crush
bufferlist cbl;
}
f->close_section();
+ f->open_array_section("primary_temp");
+ for (map<pg_t, int>::const_iterator p = primary_temp->begin();
+ p != primary_temp->end();
+ ++p) {
+ f->dump_stream("pgid") << p->first;
+ f->dump_int("osd", p->second);
+ }
+ f->close_section(); // primary_temp
+
f->open_array_section("blacklist");
for (hash_map<entity_addr_t,utime_t>::const_iterator p = blacklist.begin();
p != blacklist.end();
map<int32_t,uint8_t> new_state; // XORed onto previous state.
map<int32_t,uint32_t> new_weight;
map<pg_t,vector<int32_t> > new_pg_temp; // [] to remove
+ map<pg_t, int> new_primary_temp; // [-1] to remove
map<int32_t,epoch_t> new_up_thru;
map<int32_t,pair<epoch_t,epoch_t> > new_last_clean_interval;
map<int32_t,epoch_t> new_lost;
vector<__u32> osd_weight; // 16.16 fixed point, 0x10000 = "in", 0 = "out"
vector<osd_info_t> osd_info;
std::tr1::shared_ptr< map<pg_t,vector<int> > > pg_temp; // temp pg mapping (e.g. while we rebuild)
+ std::tr1::shared_ptr< map<pg_t,int > > primary_temp; // temp primary mapping (e.g. while we rebuild)
map<int64_t,pg_pool_t> pools;
map<int64_t,string> pool_name;
num_osd(0), max_osd(0),
osd_addrs(new addrs_s),
pg_temp(new map<pg_t,vector<int> >),
+ primary_temp(new map<pg_t,int>),
osd_uuid(new vector<uuid_d>),
cluster_snapshot_epoch(0),
new_blacklist_entries(false),