From: Samuel Just Date: Tue, 2 Apr 2019 18:39:31 +0000 (-0700) Subject: osd/: move min_peer_*_features and helpers X-Git-Tag: v15.1.0~2774^2~44 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=16d388bdae16db92b6911f7e6149906103a5f52f;p=ceph.git osd/: move min_peer_*_features and helpers Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.h b/src/osd/PG.h index f1fe3f4b3d6b..60939cd36c9d 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1398,15 +1398,6 @@ protected: bool delete_needs_sleep = false; protected: - void reset_min_peer_features() { - peer_features = CEPH_FEATURES_SUPPORTED_DEFAULT; - } - uint64_t get_min_peer_features() const { return peer_features; } - void apply_peer_features(uint64_t f) { peer_features &= f; } - - uint64_t get_min_acting_features() const { return acting_features; } - uint64_t get_min_upacting_features() const { return upacting_features; } - bool hard_limit_pglog() const { return (get_osdmap()->test_flag(CEPH_OSDMAP_PGLOG_HARDLIMIT)); } diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index 8009032553d3..00f1eadbfa36 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -4460,7 +4460,7 @@ PeeringState::GetInfo::GetInfo(my_context ctx) prior_set = ps->build_prior(); - pg->reset_min_peer_features(); + ps->reset_min_peer_features(); get_infos(); if (prior_set.pg_down) { post_event(IsDown()); @@ -4542,13 +4542,13 @@ boost::statechart::result PeeringState::GetInfo::react(const MNotifyRec& infoevt } psdout(20) << "Adding osd: " << infoevt.from.osd << " peer features: " << hex << infoevt.features << dec << dendl; - pg->apply_peer_features(infoevt.features); + ps->apply_peer_features(infoevt.features); // are we done getting everything? if (peer_info_requested.empty() && !prior_set.pg_down) { - psdout(20) << "Common peer features: " << hex << pg->get_min_peer_features() << dec << dendl; - psdout(20) << "Common acting features: " << hex << pg->get_min_acting_features() << dec << dendl; - psdout(20) << "Common upacting features: " << hex << pg->get_min_upacting_features() << dec << dendl; + psdout(20) << "Common peer features: " << hex << ps->get_min_peer_features() << dec << dendl; + psdout(20) << "Common acting features: " << hex << ps->get_min_acting_features() << dec << dendl; + psdout(20) << "Common upacting features: " << hex << ps->get_min_upacting_features() << dec << dendl; post_event(GotInfo()); } } diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index 33778a3af2cb..0c5bc133b752 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -1594,6 +1594,17 @@ public: return missing_loc.num_unfound(); } +private: + void apply_peer_features(uint64_t f) { peer_features &= f; } + void reset_min_peer_features() { + peer_features = CEPH_FEATURES_SUPPORTED_DEFAULT; + } +public: + 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; } + + // Flush control interface private: void start_flush(ObjectStore::Transaction *t) {