From: Sage Weil Date: Wed, 7 Oct 2015 04:39:41 +0000 (-0400) Subject: mon/PGMonitor: drop old creating_pgs_by_osd X-Git-Tag: v10.0.1~26^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0389763a5b6777ca16b4dec9b13ac4efc0b0973f;p=ceph.git mon/PGMonitor: drop old creating_pgs_by_osd Obsoleted by creating_pgs_by_osd_epoch. Signed-off-by: Sage Weil --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 0f67ae7eb662..6eb8b33d7995 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -472,7 +472,6 @@ void PGMap::stat_pg_add(const pg_t &pgid, const pg_stat_t &s, bool nocreating, if (s.state & PG_STATE_CREATING) { creating_pgs.insert(pgid); if (s.acting_primary >= 0) { - creating_pgs_by_osd[s.acting_primary].insert(pgid); creating_pgs_by_osd_epoch[s.acting_primary][s.mapping_epoch].insert(pgid); } } @@ -512,10 +511,6 @@ void PGMap::stat_pg_sub(const pg_t &pgid, const pg_stat_t &s, bool nocreating, if (s.state & PG_STATE_CREATING) { creating_pgs.erase(pgid); if (s.acting_primary >= 0) { - creating_pgs_by_osd[s.acting_primary].erase(pgid); - if (creating_pgs_by_osd[s.acting_primary].size() == 0) - creating_pgs_by_osd.erase(s.acting_primary); - map >& r = creating_pgs_by_osd_epoch[s.acting_primary]; r[s.mapping_epoch].erase(pgid); if (r[s.mapping_epoch].empty()) diff --git a/src/mon/PGMap.h b/src/mon/PGMap.h index 3a3824027acc..d2b9e8af1db1 100644 --- a/src/mon/PGMap.h +++ b/src/mon/PGMap.h @@ -182,7 +182,6 @@ public: public: set creating_pgs; - map > creating_pgs_by_osd; map > > creating_pgs_by_osd_epoch; // Bits that use to be enum StuckPG diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index e9b892cb38f5..51a91c156c9d 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -1135,10 +1135,6 @@ void PGMonitor::map_pg_creates() acting_primary != s->acting_primary) { changed = true; if (s->acting_primary != -1) { - pg_map.creating_pgs_by_osd[s->acting_primary].erase(pgid); - if (pg_map.creating_pgs_by_osd[s->acting_primary].size() == 0) - pg_map.creating_pgs_by_osd.erase(s->acting_primary); - map >& r = pg_map.creating_pgs_by_osd_epoch[s->acting_primary]; r[s->mapping_epoch].erase(pgid); @@ -1167,7 +1163,6 @@ void PGMonitor::map_pg_creates() if (changed) { pg_map.creating_pgs_by_osd_epoch[acting_primary][s->mapping_epoch].insert( pgid); - pg_map.creating_pgs_by_osd[acting_primary].insert(pgid); } } else { dout(20) << "map_pg_creates " << pgid << " -> no osds in epoch " @@ -1175,12 +1170,6 @@ void PGMonitor::map_pg_creates() continue; // blarney! } } - for (map >::iterator p = pg_map.creating_pgs_by_osd.begin(); - p != pg_map.creating_pgs_by_osd.end(); - ++p) { - dout(10) << "map_pg_creates osd." << p->first - << " has " << p->second.size() << " pgs" << dendl; - } } void PGMonitor::send_pg_creates() @@ -1201,8 +1190,9 @@ void PGMonitor::send_pg_creates() << " pgs" << dendl; utime_t now = ceph_clock_now(g_ceph_context); - for (map >::iterator p = pg_map.creating_pgs_by_osd.begin(); - p != pg_map.creating_pgs_by_osd.end(); + for (map> >::iterator p = + pg_map.creating_pgs_by_osd_epoch.begin(); + p != pg_map.creating_pgs_by_osd_epoch.end(); ++p) { int osd = p->first;