]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: convert waiting_for_pg from hash_map to map.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Mon, 14 Feb 2011 21:24:40 +0000 (13:24 -0800)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 18 Feb 2011 23:41:41 +0000 (15:41 -0800)
This doesn't need to be a hash_map; there will only be an entry
for each PG that gets a message request while it's not active.
Shouldn't be too many PGs that that happens too, right?

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/osd/OSD.h

index cb793315ed8677e99c67afac74364906b75f6685..e43101b364506b50810024b09452c6f7cc6a7d2e 100644 (file)
@@ -498,7 +498,7 @@ protected:
   // -- placement groups --
   map<int, PGPool*> pool_map;
   hash_map<pg_t, PG*> pg_map;
-  hash_map<pg_t, list<Message*> > waiting_for_pg;
+  map<pg_t, list<Message*> > waiting_for_pg;
 
   PGPool *_get_pool(int id);
   void _put_pool(PGPool *p);
@@ -525,7 +525,7 @@ protected:
     }
   }
   void wake_all_pg_waiters() {
-    for (hash_map<pg_t, list<Message*> >::iterator p = waiting_for_pg.begin();
+    for (map<pg_t, list<Message*> >::iterator p = waiting_for_pg.begin();
         p != waiting_for_pg.end();
         p++)
       take_waiters(p->second);