]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon: remove need for friending OSDMap to PGMapUpdater
authorJohn Spray <john.spray@redhat.com>
Thu, 22 Sep 2016 17:01:21 +0000 (18:01 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 29 Sep 2016 16:27:06 +0000 (17:27 +0100)
This used to be the friend relationship to PGMonitor.  It
was never really needed anyway, it was only being used
to skip the getter on `pools`

Signed-off-by: John Spray <john.spray@redhat.com>
src/mon/PGMap.cc
src/osd/OSDMap.h

index 82fedf736d3b2665ff10741996ad5b14115684af..37099cb0008169e0cb666956add05ef45d07016c 100644 (file)
@@ -2212,7 +2212,9 @@ void PGMapUpdater::register_new_pgs(
            << ", last_pg_scan " << pg_map->last_pg_scan << dendl;
 
   int created = 0;
-  for (const auto &p : osd_map.pools) {
+  const auto &pools = osd_map.get_pools();
+
+  for (const auto &p : pools) {
     int64_t poolid = p.first;
     const pg_pool_t &pool = p.second;
     int ruleno = osd_map.crush->find_rule(pool.get_crush_ruleset(),
index ce5a0384f946adf353302ca5a994848eb511d11c..4f05dc256693bf0b64cd3f73d5d18c586c2a3c28 100644 (file)
@@ -255,8 +255,6 @@ private:
   ceph::shared_ptr<CrushWrapper> crush;       // hierarchical map
 
   friend class OSDMonitor;
-  // FIXME: the elements required for PGMap updates should be exposed properly
-  friend class PGMapUpdater;
 
  public:
   OSDMap() : epoch(0),