From: Sage Weil Date: Mon, 26 Sep 2011 03:56:56 +0000 (-0700) Subject: osd: some PgPriorSet comments, trivial cleanups, new FIXME X-Git-Tag: v0.37~119 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=532c594cbc3f053bf231520bf6bdaddb91482161;p=ceph.git osd: some PgPriorSet comments, trivial cleanups, new FIXME Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index a4da595b4d97..d24446cc05f7 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4888,6 +4888,8 @@ PG::PgPriorSet::PgPriorSet(int whoami, // see if i have ever started since joining the pg. this is important only // if we want to exclude lost osds. + // FIXME: this check is broken. it is probably better than nothing (which would allow + // us to go active with an empty PG), but it needs a closer look! set started_since_joining; for (vector::const_iterator q = acting.begin(); q != acting.end(); q++) { int o = *q; @@ -4900,14 +4902,13 @@ PG::PgPriorSet::PgPriorSet(int whoami, break; // we don't care if (!interval.maybe_went_rw) continue; - if (std::find(interval.acting.begin(), interval.acting.end(), o) - != interval.acting.end()) + if (std::find(interval.acting.begin(), interval.acting.end(), o) != interval.acting.end()) started_since_joining.insert(o); break; } } - - dout(10) << "build_prior " << started_since_joining << " have started since joining this pg" << dendl; + dout(10) << "build_prior osds <" << started_since_joining + << "> have started since joining this pg" << dendl; for (map::const_reverse_iterator p = past_intervals.rbegin(); p != past_intervals.rend(); @@ -4927,7 +4928,6 @@ PG::PgPriorSet::PgPriorSet(int whoami, // consider UP osds for (unsigned i=0; i cur; // current+prior OSDs, as defined by info.history.last_epoch_started. set down; // down osds normally exluded from cur set lost; // osds in the prior set which are lost map up_thru; // osds whose up_thru we care about vector inter_up_thru; // intervals whose up_thru we care about - bool crashed; + bool crashed; /// true if past osd failures were such that clients may need to replay requests. bool pg_down; bool some_down; const PG *pg;