From: sajibreadd Date: Wed, 10 Apr 2024 00:47:48 +0000 (+0200) Subject: OSDService::fast_shutdown created to avoid segmentation fault while fast shutdown... X-Git-Tag: v20.0.0~1938^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d7593b20d290453e3dadf9f5b5f3437b847041cc;p=ceph.git OSDService::fast_shutdown created to avoid segmentation fault while fast shutdown of osd Fixes: https://tracker.ceph.com/issues/64373 Signed-off-by: Md Mahamudur Rahaman Sajib --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 85207f17311..38fa99f3526 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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(); diff --git a/src/osd/OSD.h b/src/osd/OSD.h index b294aba7e0f..6cebf169ff9 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -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");