]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/: move min_peer_*_features and helpers
authorSamuel Just <sjust@redhat.com>
Tue, 2 Apr 2019 18:39:31 +0000 (11:39 -0700)
committersjust@redhat.com <sjust@redhat.com>
Wed, 1 May 2019 18:22:22 +0000 (11:22 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/PG.h
src/osd/PeeringState.cc
src/osd/PeeringState.h

index f1fe3f4b3d6b7faf1874b2053f936b64042de1d4..60939cd36c9defee2f6eadaa5dcfb1d4d8cb1a45 100644 (file)
@@ -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));
   }
index 8009032553d3bec5e206d6cc1f12bb7f8bdcb989..00f1eadbfa36238f97e9c0d037b4a529e587b498 100644 (file)
@@ -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());
     }
   }
index 33778a3af2cbbd4b5f7a344a4782fc845cec20c0..0c5bc133b7529a45d7fba3ea643bd7ef7695c112 100644 (file)
@@ -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) {