]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDService::fast_shutdown created to avoid segmentation fault while fast shutdown... 57613/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:12:43 +0000 (15:12 +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 e740958a074fd15c4c916bb3765dec3871c19fdd..84c4b79367093282472959c9d84dafffd397124b 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();
@@ -4598,6 +4607,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");