]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD::handle_osd_map: don't lock pgs while advancing maps
authorSamuel Just <sam.just@inktank.com>
Wed, 18 Jul 2012 22:37:28 +0000 (15:37 -0700)
committerSamuel Just <sam.just@inktank.com>
Wed, 18 Jul 2012 22:37:28 +0000 (15:37 -0700)
We no longer do anything with the pgs here.  PG map
advancing is now handled in OSD::advance_pg asyncronously.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/OSD.cc

index 856a176f7996e6107713cd5440b6971c47ebb831..9a59a84a224080bab039aa4a0748ebcb1347a6da 100644 (file)
@@ -3363,14 +3363,6 @@ void OSD::handle_osd_map(MOSDMap *m)
 
   C_Contexts *fin = new C_Contexts(g_ceph_context);
 
-  // lock all pgs
-  for (hash_map<pg_t,PG*>::iterator i = pg_map.begin();
-       i != pg_map.end();
-       i++) {
-    PG *pg = i->second;
-    pg->lock_with_map_lock_held(true);
-  }
-
   // advance through the new maps
   for (epoch_t cur = start; cur <= superblock.newest_map; cur++) {
     dout(10) << " advance to epoch " << cur << " (<= newest " << superblock.newest_map << ")" << dendl;
@@ -3404,16 +3396,6 @@ void OSD::handle_osd_map(MOSDMap *m)
     }
   }
 
-  // write and unlock pgs
-  for (hash_map<pg_t,PG*>::iterator i = pg_map.begin();
-       i != pg_map.end();
-       i++) {
-    PG *pg = i->second;
-    //pg->lock_with_map_lock_held();
-    pg->write_if_dirty(t);
-    pg->unlock();
-  }
-
   bool do_shutdown = false;
   bool do_restart = false;
   if (osdmap->get_epoch() > 0 &&