]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMonitor: do not send pg_creates for split PGs 8247/head
authorSage Weil <sage@redhat.com>
Tue, 22 Mar 2016 15:44:07 +0000 (11:44 -0400)
committerSage Weil <sage@redhat.com>
Wed, 23 Mar 2016 15:41:29 +0000 (11:41 -0400)
They will split from the parent on their own, and the OSD drops these
PGs on the floor anyway in OSD::handle_pg_create().

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/PGMap.cc

index 81162012b0e730405598e05331b9216a64236f32..fbef9bab0c4b5980e29cd554f6b3e3010fa7a4e6 100644 (file)
@@ -468,7 +468,8 @@ void PGMap::stat_pg_add(const pg_t &pgid, const pg_stat_t &s,
   num_pg++;
   num_pg_by_state[s.state]++;
 
-  if (s.state & PG_STATE_CREATING) {
+  if ((s.state & PG_STATE_CREATING) &&
+      s.parent_split_bits == 0) {
     creating_pgs.insert(pgid);
     if (s.acting_primary >= 0) {
       creating_pgs_by_osd_epoch[s.acting_primary][s.mapping_epoch].insert(pgid);
@@ -505,7 +506,8 @@ void PGMap::stat_pg_sub(const pg_t &pgid, const pg_stat_t &s,
   if (end == 0)
     num_pg_by_state.erase(s.state);
 
-  if (s.state & PG_STATE_CREATING) {
+  if ((s.state & PG_STATE_CREATING) &&
+      s.parent_split_bits == 0) {
     creating_pgs.erase(pgid);
     if (s.acting_primary >= 0) {
       map<epoch_t,set<pg_t> >& r = creating_pgs_by_osd_epoch[s.acting_primary];