Calculate biginfo on the fly.
Signed-off-by: Sage Weil <sage@redhat.com>
// create
PG *pg;
- hobject_t logoid = make_pg_log_oid(pgid);
- hobject_t infooid = make_pg_biginfo_oid(pgid);
if (createmap->get_pg_type(pgid.pgid) == pg_pool_t::TYPE_REPLICATED ||
createmap->get_pg_type(pgid.pgid) == pg_pool_t::TYPE_ERASURE)
- pg = new ReplicatedPG(&service, createmap, pool, pgid, logoid, infooid);
+ pg = new ReplicatedPG(&service, createmap, pool, pgid);
else
assert(0);
}
PG::PG(OSDService *o, OSDMapRef curmap,
- const PGPool &_pool, spg_t p, const hobject_t& loid,
- const hobject_t& ioid) :
+ const PGPool &_pool, spg_t p) :
osd(o),
cct(o->cct),
osdriver(osd->store, coll_t(), OSD::make_snapmapper_oid()),
info_struct_v(0),
coll(p), pg_log(cct),
pgmeta_oid(p.make_pgmeta_oid()),
- log_oid(loid), biginfo_oid(ioid),
+ log_oid(OSD::make_pg_log_oid(p)),
missing_loc(this),
recovery_item(this), scrub_item(this), scrub_finalize_item(this), snap_trim_item(this), stat_queue_item(this),
recovery_ops_active(0),
void PG::read_state(ObjectStore *store, bufferlist &bl)
{
+ hobject_t biginfo_oid(OSD::make_pg_biginfo_oid(pg_id));
+
int r = read_info(store, coll, bl, info, past_intervals, biginfo_oid,
osd->infos_oid, snap_collections, info_struct_v);
assert(r >= 0);
}
ghobject_t pgmeta_oid;
hobject_t log_oid;
- hobject_t biginfo_oid;
class MissingLoc {
map<hobject_t, pg_missing_t::item> needs_recovery_map;
public:
PG(OSDService *o, OSDMapRef curmap,
- const PGPool &pool, spg_t p, const hobject_t& loid, const hobject_t& ioid);
+ const PGPool &pool, spg_t p);
virtual ~PG();
private:
}
ReplicatedPG::ReplicatedPG(OSDService *o, OSDMapRef curmap,
- const PGPool &_pool, spg_t p, const hobject_t& oid,
- const hobject_t& ioid) :
- PG(o, curmap, _pool, p, oid, ioid),
+ const PGPool &_pool, spg_t p) :
+ PG(o, curmap, _pool, p),
pgbackend(
PGBackend::build_pg_backend(
_pool.info, curmap, this, coll_t(p), coll_t::make_temp_coll(p), o->store, cct)),
public:
ReplicatedPG(OSDService *o, OSDMapRef curmap,
- const PGPool &_pool, spg_t p, const hobject_t& oid,
- const hobject_t& ioid);
+ const PGPool &_pool, spg_t p);
~ReplicatedPG() {}
int do_command(cmdmap_t cmdmap, ostream& ss, bufferlist& idata,