cache_target_full_ratio_micro);
f->dump_unsigned("cache_min_flush_age", cache_min_flush_age);
f->dump_unsigned("cache_min_evict_age", cache_min_evict_age);
- f->open_object_section("properties");
- for (map<string,string>::const_iterator i = properties.begin();
- i != properties.end();
- ++i) {
- string name = i->first;
- f->dump_string(name.c_str(), i->second);
- }
- f->close_section();
+ f->dump_string("erasure_code_profile", erasure_code_profile);
f->open_object_section("hit_set_params");
hit_set_params.dump(f);
f->close_section(); // hit_set_params
}
__u8 encode_compat = 5;
- ENCODE_START(13, encode_compat, bl);
+ ENCODE_START(14, encode_compat, bl);
::encode(type, bl);
::encode(size, bl);
::encode(crush_ruleset, bl);
::encode(cache_target_full_ratio_micro, bl);
::encode(cache_min_flush_age, bl);
::encode(cache_min_evict_age, bl);
+ ::encode(erasure_code_profile, bl);
ENCODE_FINISH_NEW_COMPAT(bl, encode_compat);
}
void pg_pool_t::decode(bufferlist::iterator& bl)
{
- DECODE_START_LEGACY_COMPAT_LEN(13, 5, 5, bl);
+ DECODE_START_LEGACY_COMPAT_LEN(14, 5, 5, bl);
::decode(type, bl);
::decode(size, bl);
::decode(crush_ruleset, bl);
cache_min_flush_age = 0;
cache_min_evict_age = 0;
}
+ if (struct_v >= 14) {
+ ::decode(erasure_code_profile, bl);
+ }
DECODE_FINISH(bl);
calc_pg_masks();
a.cache_mode = CACHEMODE_WRITEBACK;
a.read_tier = 1;
a.write_tier = 1;
- a.properties["p-1"] = "v-1";
- a.properties["empty"] = string();
a.hit_set_params = HitSet::Params(new BloomHitSet::Params);
a.hit_set_period = 3600;
a.hit_set_count = 8;
a.cache_target_full_ratio_micro = 987222;
a.cache_min_flush_age = 231;
a.cache_min_evict_age = 2321;
+ a.erasure_code_profile = "profile in osdmap";
o.push_back(new pg_pool_t(a));
}
public:
- map<string,string> properties; ///< interpreted according to the pool type
+ map<string,string> properties; ///< OBSOLETE
+ string erasure_code_profile; ///< name of the erasure code profile in OSDMap
epoch_t last_change; ///< most recent epoch changed, exclusing snapshot changes
snapid_t snap_seq; ///< seq for per-pool snapshot
epoch_t snap_epoch; ///< osdmap epoch of last snap