]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDService::fast_shutdown created to avoid segmentation fault while fast shutdown... 57615/head
authorsajibreadd <sajibreadd@gmail.com>
Wed, 10 Apr 2024 00:47:48 +0000 (02:47 +0200)
committersajibreadd <sajibreadd@gmail.com>
Wed, 22 May 2024 09:28:30 +0000 (15:28 +0600)
Fixes: https://tracker.ceph.com/issues/64373
Signed-off-by: Md Mahamudur Rahaman Sajib <mahamudur.sajib@croit.io>
(cherry picked from commit d7593b20d290453e3dadf9f5b5f3437b847041cc)

src/osd/OSD.cc
src/osd/OSD.h

index 515eb60423757ec7dbe3095949f33b1633493704..b7140181a1cebfd96007e20c1230bcea461bcaac 100644 (file)
@@ -527,6 +527,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();
@@ -4576,6 +4585,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 d25879001528926b3d28c138deffe07d43a49aef..261a258f4bd13987262b6d6e365e88bd6275cb6e 100644 (file)
@@ -724,6 +724,7 @@ public:
   void start_shutdown();
   void shutdown_reserver();
   void shutdown();
+  void fast_shutdown();
 
   // -- stats --
   ceph::mutex stat_lock = ceph::make_mutex("OSDService::stat_lock");