active_pushes(0),
recovery_state(this),
pg_id(p),
- peer_features(CEPH_FEATURES_SUPPORTED_DEFAULT)
+ peer_features(CEPH_FEATURES_SUPPORTED_DEFAULT),
+ acting_features(CEPH_FEATURES_SUPPORTED_DEFAULT),
+ upacting_features(CEPH_FEATURES_SUPPORTED_DEFAULT)
{
#ifdef PG_DEBUG_REFS
osd->add_pgid(p, this);
osd->clog->info(oss);
}
- if (peer_features & CEPH_FEATURE_OSD_OBJECT_DIGEST)
+ if (get_min_acting_features() & CEPH_FEATURE_OSD_OBJECT_DIGEST)
scrubber.seed = -1; // better, and enables oi digest checks
else
scrubber.seed = 0; // compat
}
// can we relate scrub digests to oi digests?
- bool okseed = (get_min_peer_features() & CEPH_FEATURE_OSD_OBJECT_DIGEST);
+ bool okseed = (get_min_upacting_features() & CEPH_FEATURE_OSD_OBJECT_DIGEST);
assert(okseed == (scrubber.seed == 0xffffffff));
get_pgbackend()->be_compare_scrubmaps(
if (!prior_set.get())
pg->build_prior(prior_set);
- pg->reset_peer_features();
+ pg->reset_all_min_features();
get_infos();
if (peer_info_requested.empty() && !prior_set->pg_down) {
post_event(GotInfo());
}
get_infos();
}
- dout(20) << "Adding osd: " << infoevt.from.osd << " features: "
+ dout(20) << "Adding osd: " << infoevt.from.osd << " peer features: "
<< hex << infoevt.features << dec << dendl;
pg->apply_peer_features(infoevt.features);
+ if (std::find(pg->acting.begin(), pg->acting.end(), infoevt.from.osd) != pg->acting.end()) {
+ dout(20) << "Adding osd: " << infoevt.from.osd << " acting features: "
+ << hex << infoevt.features << dec << dendl;
+ pg->apply_acting_features(infoevt.features);
+ }
+
+ if (std::find(pg->up.begin(), pg->up.end(), infoevt.from.osd) != pg->up.end()) {
+ dout(20) << "Adding osd: " << infoevt.from.osd << " upacting features: "
+ << hex << infoevt.features << dec << dendl;
+ pg->apply_upacting_features(infoevt.features);
+ }
+
// are we done getting everything?
if (peer_info_requested.empty() && !prior_set->pg_down) {
/*
break;
}
}
- dout(20) << "Common features: " << hex << pg->get_min_peer_features() << dec << dendl;
+ dout(20) << "Common peer features: " << hex << pg->get_min_peer_features() << dec << dendl;
+ dout(20) << "Common acting features: " << hex << pg->get_min_acting_features() << dec << dendl;
+ dout(20) << "Common upacting features: " << hex << pg->get_min_upacting_features() << dec << dendl;
post_event(GotInfo());
}
}
PG& operator=(const PG& rhs);
const spg_t pg_id;
uint64_t peer_features;
+ uint64_t acting_features;
+ uint64_t upacting_features;
public:
const spg_t& get_pgid() const { return pg_id; }
int get_nrep() const { return acting.size(); }
- void reset_peer_features() { peer_features = CEPH_FEATURES_SUPPORTED_DEFAULT; }
+ void reset_all_min_features() {
+ peer_features = CEPH_FEATURES_SUPPORTED_DEFAULT;
+ acting_features = CEPH_FEATURES_SUPPORTED_DEFAULT;
+ upacting_features = CEPH_FEATURES_SUPPORTED_DEFAULT;
+ }
uint64_t get_min_peer_features() const { return peer_features; }
+ uint64_t get_min_acting_features() const { return acting_features; }
+ uint64_t get_min_upacting_features() const { return upacting_features; }
void apply_peer_features(uint64_t f) { peer_features &= f; }
+ void apply_acting_features(uint64_t f) { acting_features &= f; }
+ void apply_upacting_features(uint64_t f) { upacting_features &= f; }
void init_primary_up_acting(
const vector<int> &newup,