]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Timer: add some asserts to catch certain errors.
authorGreg Farnum <gregf@hq.newdream.net>
Mon, 29 Nov 2010 21:33:47 +0000 (13:33 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Mon, 29 Nov 2010 21:35:16 +0000 (13:35 -0800)
src/common/Timer.cc
src/mds/MDS.cc

index 8aec0eb8678818e46316181b4157e29091db40c3..7a3439e37f173d2f085655cc673faf19108455c3 100644 (file)
@@ -68,13 +68,12 @@ void SafeTimer::shutdown()
 {
   dout(10) << "shutdown" << dendl;
   if (thread) {
+    assert(lock.is_locked());
     cancel_all_events();
     stopping = true;
     cond.Signal();
     lock.Unlock();
-
     thread->join();
-
     lock.Lock();
     delete thread;
     thread = NULL;
index 4e851fe005064b3f0cfb9b7157f8ab827f5d70ae..d1f71ea4fbaec1009b27efb4d5cc3fd2d524a303 100644 (file)
@@ -1374,6 +1374,7 @@ void MDS::stopping_done()
 
 void MDS::suicide()
 {
+  assert(mds_lock.is_locked());
   if (want_state == MDSMap::STATE_STOPPED)
     state = want_state;
   else