]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDService::fast_shutdown created to avoid segmentation fault while fast shutdown... 56804/head
authorsajibreadd <sajibreadd@gmail.com>
Wed, 10 Apr 2024 00:47:48 +0000 (02:47 +0200)
committersajibreadd <sajibreadd@gmail.com>
Mon, 29 Apr 2024 09:23:52 +0000 (11:23 +0200)
Fixes: https://tracker.ceph.com/issues/64373
Signed-off-by: Md Mahamudur Rahaman Sajib <mahamudur.sajib@croit.io>
src/osd/OSD.cc
src/osd/OSD.h

index 85207f1731166e0fbefe67f2e4630b30528d332a..38fa99f352623e58c5c3a35bffab272a38b2a9ec 100644 (file)
@@ -516,6 +516,15 @@ void OSDService::shutdown()
   next_osdmap = OSDMapRef();
 }
 
+void OSDService::fast_shutdown()
+{
+  mono_timer.suspend();
+  {
+    std::lock_guard l(watch_lock);
+    watch_timer.shutdown();
+  }
+}
+
 void OSDService::init()
 {
   reserver_finisher.start();
@@ -4600,6 +4609,7 @@ int OSD::shutdown()
 
     utime_t  start_time_umount = ceph_clock_now();
     store->prepare_for_fast_shutdown();
+    service.fast_shutdown();
     std::lock_guard lock(osd_lock);
     // TBD: assert in allocator that nothing is being add
     store->umount();
index b294aba7e0f02ff66cd85a4a3a86f50236185121..6cebf169ff98e4984dbc7f9a0d85e122049ceafe 100644 (file)
@@ -712,6 +712,7 @@ public:
   void start_shutdown();
   void shutdown_reserver();
   void shutdown();
+  void fast_shutdown();
 
   // -- stats --
   ceph::mutex stat_lock = ceph::make_mutex("OSDService::stat_lock");