// true if the given map affects the prior set
bool PG::prior_set_affected(PgPriorSet &prior, const OSDMap *osdmap) const
{
- for (set<int>::iterator p = prior.cur.begin();
- p != prior.cur.end();
+ for (set<int>::iterator p = prior.probe.begin();
+ p != prior.probe.end();
++p)
{
int o = *p;
for (map<int, Info>::const_iterator i = all_info.begin();
i != all_info.end();
++i) {
- if (prior_set.cur.find(i->first) == prior_set.cur.end()) {
+ if (prior_set.probe.find(i->first) == prior_set.probe.end()) {
dout(10) << "osd." << i->first << " not in current prior set, skipping" << dendl;
continue;
}
std::ostream& operator<<(std::ostream& oss,
const struct PG::PgPriorSet &prior)
{
- oss << "PgPriorSet[cur=" << prior.cur << " "
+ oss << "PgPriorSet[probe=" << prior.probe << " "
<< "down=" << prior.down << " "
<< "blocked_by=" << prior.blocked_by << "]";
return oss;
PG *pg = context< RecoveryMachine >().pg;
auto_ptr<PgPriorSet> &prior_set = context< Peering >().prior_set;
- for (set<int>::const_iterator it = prior_set->cur.begin();
- it != prior_set->cur.end();
+ for (set<int>::const_iterator it = prior_set->probe.begin();
+ it != prior_set->probe.end();
++it) {
int peer = *it;
if (peer == pg->osd->whoami) {
// so that we know what they do/do not have explicitly before
// sending them any new info/logs/whatever.
for (unsigned i=0; i<acting.size(); i++)
- cur.insert(acting[i]);
+ probe.insert(acting[i]);
// It may be possible to exlude the up nodes, but let's keep them in
// there for now.
for (unsigned i=0; i<up.size(); i++)
- cur.insert(up[i]);
+ probe.insert(up[i]);
for (map<epoch_t,Interval>::const_reverse_iterator p = past_intervals.rbegin();
p != past_intervals.rend();
if (osdmap.is_up(o)) {
// include past acting osds if they are up.
- cur.insert(o);
+ probe.insert(o);
any_up_now = true;
} else if (!pinfo) {
dout(10) << "build_prior prior osd." << o << " no longer exists" << dendl;
++i) {
if (osdmap.exists(*i) && // if it doesn't exist, we already consider it lost.
osdmap.is_down(*i)) {
- cur.insert(*i);
+ probe.insert(*i);
pg_down = true;
// make note of when any down osd in the cur set was lost, so that
}
}
- dout(10) << "build_prior final: cur " << cur << " down " << down << " blocked_by " << blocked_by
+ dout(10) << "build_prior final: probe " << probe
+ << " down " << down
+ << " blocked_by " << blocked_by
<< (crashed ? " crashed":"")
<< (pg_down ? " pg_down":"")
<< dendl;
bool prior_set_built;
struct PgPriorSet {
- set<int> cur; /// current+prior OSDs we need to probe.
- set<int> down; /// down osds that would normally be in @cur and might be interesting.
+ set<int> probe; /// current+prior OSDs we need to probe.
+ set<int> down; /// down osds that would normally be in @probe and might be interesting.
map<int,epoch_t> blocked_by; /// current lost_at values for any OSDs in cur set for which (re)marking them lost would affect cur set
bool crashed; /// true if past osd failures were such that clients may need to replay requests.