PGBackend *PGBackend::build_pg_backend(
const pg_pool_t &pool,
+ const OSDMapRef curmap,
Listener *l,
coll_t coll,
coll_t temp_coll,
}
case pg_pool_t::TYPE_ERASURE: {
ErasureCodeInterfaceRef ec_impl;
- assert(pool.properties.count("erasure-code-plugin"));
+ const map<string,string> &profile = curmap->get_erasure_code_profile(pool.erasure_code_profile);
+ assert(profile.count("plugin"));
stringstream ss;
ceph::ErasureCodePluginRegistry::instance().factory(
- pool.properties.find("erasure-code-plugin")->second,
- pool.properties,
+ profile.find("plugin")->second,
+ profile,
&ec_impl,
ss);
assert(ec_impl);
static PGBackend *build_pg_backend(
const pg_pool_t &pool,
+ const OSDMapRef curmap,
Listener *l,
coll_t coll,
coll_t temp_coll,
PG(o, curmap, _pool, p, oid, ioid),
pgbackend(
PGBackend::build_pg_backend(
- _pool.info, this, coll_t(p), coll_t::make_temp_coll(p), o->store, cct)),
+ _pool.info, curmap, this, coll_t(p), coll_t::make_temp_coll(p), o->store, cct)),
snapset_contexts_lock("ReplicatedPG::snapset_contexts"),
temp_seq(0),
snap_trimmer_machine(this)