]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDMonitor: remove primary_temp entries when you remove their pool
authorGreg Farnum <greg@inktank.com>
Thu, 19 Dec 2013 01:53:51 +0000 (17:53 -0800)
committerGreg Farnum <greg@inktank.com>
Thu, 16 Jan 2014 00:33:06 +0000 (16:33 -0800)
Signed-off-by: Greg Farnum <greg@inktank.com>
src/mon/OSDMonitor.cc

index 31e977c58c4b4b8cbbe3158fc2465ccea6ca58e5..77d33a04bbeeb2ae887820d7fffe6d982ae4338e 100644 (file)
@@ -4651,6 +4651,15 @@ int OSDMonitor::_prepare_remove_pool(uint64_t pool)
       pending_inc.new_pg_temp[p->first].clear();
     }
   }
+  for (map<pg_t,int>::iterator p = osdmap.primary_temp->begin();
+      p != osdmap.primary_temp->end();
+      ++p) {
+    if (p->first.pool() == pool) {
+      dout(10) << "_prepare_remove_pool " << pool
+               << " removing obsolete primary_temp" << p->first << dendl;
+      pending_inc.new_primary_temp[p->first] = -1;
+    }
+  }
   return 0;
 }