]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: cancel agent_timer events on shutdown 2085/head
authorSage Weil <sage@inktank.com>
Fri, 9 May 2014 15:41:33 +0000 (08:41 -0700)
committerSage Weil <sage@inktank.com>
Tue, 8 Jul 2014 23:13:54 +0000 (16:13 -0700)
We need to cancel all agent timer events on shutdown.  This also needs to
happen early so that any in-progress events will execute before we start
flushing and cleaning up PGs.

Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OSD.cc
src/osd/OSD.h

index 597678722e6aaf1fdce28899f360b1c932149d84..84fe1148b81631b10f0abc3a3d662e15a41c56a5 100644 (file)
@@ -426,6 +426,15 @@ void OSDService::pg_stat_queue_dequeue(PG *pg)
   osd->pg_stat_queue_dequeue(pg);
 }
 
+void OSDService::start_shutdown()
+{
+  {
+    Mutex::Locker l(agent_timer_lock);
+    agent_timer.cancel_all_events();
+    agent_timer.shutdown();
+  }
+}
+
 void OSDService::shutdown()
 {
   reserver_finisher.stop();
@@ -446,10 +455,6 @@ void OSDService::shutdown()
     Mutex::Locker l(backfill_request_lock);
     backfill_request_timer.shutdown();
   }
-  {
-    Mutex::Locker l(agent_timer_lock);
-    agent_timer.shutdown();
-  }
   osdmap = OSDMapRef();
   next_osdmap = OSDMapRef();
 }
@@ -1627,6 +1632,8 @@ int OSD::shutdown()
   cct->_conf->set_val("debug_ms", "100");
   cct->_conf->apply_changes(NULL);
 
+  service.start_shutdown();
+
   dispatch_sessions_waiting_on_map();
 
   // Shutdown PGs
index 1926b42d74a98e40eb9c3980bc912153c6be1ce0..13f773bd38906739f394f41cbb5a71c621eaab01 100644 (file)
@@ -759,6 +759,7 @@ public:
   void pg_stat_queue_dequeue(PG *pg);
 
   void init();
+  void start_shutdown();
   void shutdown();
 
   // split