ECBackend::ECBackend(
PGBackend::Listener *pg,
coll_t coll,
+ ObjectStore::CollectionHandle &ch,
ObjectStore *store,
CephContext *cct,
ErasureCodeInterfaceRef ec_impl,
uint64_t stripe_width)
- : PGBackend(pg, store, coll),
+ : PGBackend(pg, store, coll, ch),
cct(cct),
ec_impl(ec_impl),
sinfo(ec_impl->get_data_chunk_count(), stripe_width) {
ECBackend(
PGBackend::Listener *pg,
coll_t coll,
+ ObjectStore::CollectionHandle &ch,
ObjectStore *store,
CephContext *cct,
ErasureCodeInterfaceRef ec_impl,
const OSDMapRef curmap,
Listener *l,
coll_t coll,
+ ObjectStore::CollectionHandle &ch,
ObjectStore *store,
CephContext *cct)
{
switch (pool.type) {
case pg_pool_t::TYPE_REPLICATED: {
- return new ReplicatedBackend(l, coll, store, cct);
+ return new ReplicatedBackend(l, coll, ch, store, cct);
}
case pg_pool_t::TYPE_ERASURE: {
ErasureCodeInterfaceRef ec_impl;
protected:
ObjectStore *store;
const coll_t coll;
+ ObjectStore::CollectionHandle &ch;
public:
/**
* Provides interfaces for PGBackend callbacks
};
Listener *parent;
Listener *get_parent() const { return parent; }
- PGBackend(Listener *l, ObjectStore *store, coll_t coll) :
+ PGBackend(Listener *l, ObjectStore *store, coll_t coll,
+ ObjectStore::CollectionHandle &ch) :
store(store),
coll(coll),
+ ch(ch),
parent(l) {}
bool is_primary() const { return get_parent()->pgb_is_primary(); }
OSDMapRef get_osdmap() const { return get_parent()->pgb_get_osdmap(); }
const OSDMapRef curmap,
Listener *l,
coll_t coll,
+ ObjectStore::CollectionHandle &ch,
ObjectStore *store,
CephContext *cct);
};
ReplicatedBackend::ReplicatedBackend(
PGBackend::Listener *pg,
coll_t coll,
+ ObjectStore::CollectionHandle &c,
ObjectStore *store,
CephContext *cct) :
- PGBackend(pg, store, coll),
+ PGBackend(pg, store, coll, c),
cct(cct) {}
void ReplicatedBackend::run_recovery_op(
ReplicatedBackend(
PGBackend::Listener *pg,
coll_t coll,
+ ObjectStore::CollectionHandle &ch,
ObjectStore *store,
CephContext *cct);
PG(o, curmap, _pool, p),
pgbackend(
PGBackend::build_pg_backend(
- _pool.info, curmap, this, coll_t(p), o->store, cct)),
+ _pool.info, curmap, this, coll_t(p), ch, o->store, cct)),
object_contexts(o->cct, g_conf->osd_pg_object_context_cache_count),
snapset_contexts_lock("ReplicatedPG::snapset_contexts"),
backfills_in_flight(hobject_t::Comparator(true)),