From 421c8e752b0c14dfcf5d1fef3d0c81713806f062 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 22 Jul 2008 10:54:13 -0700 Subject: [PATCH] osd: stop timer thread before forking --- src/common/Timer.cc | 3 ++- src/cosd.cc | 2 ++ src/vstartnew.sh | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/Timer.cc b/src/common/Timer.cc index f434e1f99c2c8..d63687d997ea1 100644 --- a/src/common/Timer.cc +++ b/src/common/Timer.cc @@ -179,7 +179,8 @@ void Timer::cancel_timer() dout(10) << "waiting for thread to finish" << dendl; void *ptr; timer_thread.join(&ptr); - + thread_stop = false; + dout(10) << "thread finished, exit code " << ptr << dendl; } } diff --git a/src/cosd.cc b/src/cosd.cc index 56aa8446746bf..3f22b45b1a5b0 100644 --- a/src/cosd.cc +++ b/src/cosd.cc @@ -115,6 +115,8 @@ int main(int argc, const char **argv) << " dev " << dev << std::endl; + g_timer.shutdown(); + rank.start(); rank.set_policy(entity_name_t::TYPE_MON, Rank::Policy::fast_fail()); diff --git a/src/vstartnew.sh b/src/vstartnew.sh index 0a981c95027e5..46fdbe3462eee 100755 --- a/src/vstartnew.sh +++ b/src/vstartnew.sh @@ -38,7 +38,7 @@ for osd in 0 #1 2 3 #4 5 6 7 8 9 10 11 12 13 14 15 do $CEPH_BIN/cosd --mkfs_for_osd $osd dev/osd$osd # initialize empty object store #valgrind --leak-check=full --show-reachable=yes $CEPH_BIN/cosd dev/osd$osd --debug_ms 1 --debug_osd 20 --debug_filestore 10 1>out/o$osd & #--debug_osd 40 - $CEPH_BIN/cosd dev/osd$osd -d --debug_ms 1 --debug_osd 20 # --debug_filestore 10 + $CEPH_BIN/cosd -m $IP:12345 dev/osd$osd -d --debug_ms 1 --debug_osd 20 # --debug_filestore 10 done # mds -- 2.39.5