summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-09-19 18:43:21 -0700
committerSage Weil <sage@inktank.com>2013-09-19 18:43:21 -0700
commit535d9d39daf79fcc5867465672f9b17760e8bb51 (patch)
treee468dde3cf7470d6afe751ce48267b6047b47b36
parent1207010be4bca688445c9161089be04f13978331 (diff)
downloadceph-535d9d39daf79fcc5867465672f9b17760e8bb51.tar.gz
osd/PG: add bloom_oid
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/osd/OSD.cc7
-rw-r--r--src/osd/OSD.h10
-rw-r--r--src/osd/PG.cc6
-rw-r--r--src/osd/PG.h3
-rw-r--r--src/osd/ReplicatedPG.cc8
-rw-r--r--src/osd/ReplicatedPG.h6
6 files changed, 29 insertions, 11 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc
index ff1276969d8..078d56b7e8b 100644
--- a/src/osd/OSD.cc
+++ b/src/osd/OSD.cc
@@ -1826,10 +1826,11 @@ PG* OSD::_make_pg(
// 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) == pg_pool_t::TYPE_REP)
- pg = new ReplicatedPG(&service, createmap, pool, pgid, logoid, infooid);
+ pg = new ReplicatedPG(&service, createmap, pool, pgid,
+ make_pg_log_oid(pgid),
+ make_pg_biginfo_oid(pgid),
+ make_pg_bloom_oid(pgid));
else
assert(0);
diff --git a/src/osd/OSD.h b/src/osd/OSD.h
index c2f45196870..eab66910739 100644
--- a/src/osd/OSD.h
+++ b/src/osd/OSD.h
@@ -726,10 +726,20 @@ public:
getline(ss, s);
return hobject_t(sobject_t(object_t(s.c_str()), 0));
}
+
+ static hobject_t make_pg_bloom_oid(pg_t pg) {
+ stringstream ss;
+ ss << "pgbloom_" << pg;
+ string s;
+ getline(ss, s);
+ return hobject_t(sobject_t(object_t(s.c_str()), 0));
+ }
+
static hobject_t make_infos_oid() {
hobject_t oid(sobject_t("infos", CEPH_NOSNAP));
return oid;
}
+
static void recursive_remove_collection(ObjectStore *store, coll_t tmp);
diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index f319d160a39..4052ef1cca3 100644
--- a/src/osd/PG.cc
+++ b/src/osd/PG.cc
@@ -141,7 +141,8 @@ void PGPool::update(OSDMapRef map)
PG::PG(OSDService *o, OSDMapRef curmap,
const PGPool &_pool, pg_t p, const hobject_t& loid,
- const hobject_t& ioid) :
+ const hobject_t& ioid,
+ const hobject_t& boid) :
osd(o),
cct(o->cct),
osdriver(osd->store, coll_t(), OSD::make_snapmapper_oid()),
@@ -160,7 +161,8 @@ PG::PG(OSDService *o, OSDMapRef curmap,
deleting(false), dirty_info(false), dirty_big_info(false),
info(p),
info_struct_v(0),
- coll(p), pg_log(cct), log_oid(loid), biginfo_oid(ioid),
+ coll(p), pg_log(cct),
+ log_oid(loid), biginfo_oid(ioid), bloom_oid(boid),
recovery_item(this), scrub_item(this), scrub_finalize_item(this), snap_trim_item(this), stat_queue_item(this),
recovery_ops_active(0),
waiting_on_backfill(0),
diff --git a/src/osd/PG.h b/src/osd/PG.h
index cdbe827a4a9..ecd00e0d0e9 100644
--- a/src/osd/PG.h
+++ b/src/osd/PG.h
@@ -298,6 +298,7 @@ public:
}
hobject_t log_oid;
hobject_t biginfo_oid;
+ hobject_t bloom_oid;
map<hobject_t, set<int> > missing_loc;
set<int> missing_loc_sources; // superset of missing_loc locations
@@ -1619,7 +1620,7 @@ public:
public:
PG(OSDService *o, OSDMapRef curmap,
- const PGPool &pool, pg_t p, const hobject_t& loid, const hobject_t& ioid);
+ const PGPool &pool, pg_t p, const hobject_t& loid, const hobject_t& ioid, const hobject_t& boid);
virtual ~PG();
private:
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index a92403ae370..8d2cf123204 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -625,9 +625,11 @@ void ReplicatedPG::calc_trim_to()
}
ReplicatedPG::ReplicatedPG(OSDService *o, OSDMapRef curmap,
- const PGPool &_pool, pg_t p, const hobject_t& oid,
- const hobject_t& ioid) :
- PG(o, curmap, _pool, p, oid, ioid),
+ const PGPool &_pool, pg_t p,
+ const hobject_t& oid,
+ const hobject_t& ioid,
+ const hobject_t& boid) :
+ PG(o, curmap, _pool, p, oid, ioid, boid),
snapset_contexts_lock("ReplicatedPG::snapset_contexts"),
temp_created(false),
temp_coll(coll_t::make_temp_coll(p)),
diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h
index e880bdecade..a19a3955458 100644
--- a/src/osd/ReplicatedPG.h
+++ b/src/osd/ReplicatedPG.h
@@ -821,8 +821,10 @@ protected:
public:
ReplicatedPG(OSDService *o, OSDMapRef curmap,
- const PGPool &_pool, pg_t p, const hobject_t& oid,
- const hobject_t& ioid);
+ const PGPool &_pool, pg_t p,
+ const hobject_t& oid,
+ const hobject_t& ioid,
+ const hobject_t& boid);
~ReplicatedPG() {}
int do_command(cmdmap_t cmdmap, ostream& ss, bufferlist& idata,