From: Kefu Chai Date: Sun, 23 Nov 2014 19:12:24 +0000 (+0800) Subject: lockdep: do not use $CEPH_LOCKDEP for g_lockdep X-Git-Tag: v0.90~50^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5470914f73d95d0af1fff7e40930c83facf663c6;p=ceph.git lockdep: do not use $CEPH_LOCKDEP for g_lockdep * a non-zero CEPH_LOCKDEP brings ceph down because g_lockdep_ceph_ctx is still being constructed when dout_impl() dereferences it. * fix a typo in comment. * remove dead code. Signed-off-by: Kefu Chai --- diff --git a/src/common/lockdep.cc b/src/common/lockdep.cc index 26ebe10cdf26a..6639d8ad731bb 100644 --- a/src/common/lockdep.cc +++ b/src/common/lockdep.cc @@ -34,14 +34,12 @@ CEPH_HASH_NAMESPACE_END #endif /******* Constants **********/ -#undef DOUT_COND -#define DOUT_COND(cct, l) cct && l <= XDOUT_CONDVAR(cct, dout_subsys) #define lockdep_dout(v) lsubdout(g_lockdep_ceph_ctx, lockdep, v) #define MAX_LOCKS 2000 // increase me as needed #define BACKTRACE_SKIP 2 /******* Globals **********/ -int g_lockdep = get_env_int("CEPH_LOCKDEP"); +int g_lockdep = 0; struct lockdep_stopper_t { // disable lockdep when this module destructs. ~lockdep_stopper_t() { @@ -140,7 +138,7 @@ int lockdep_register(const char *name) } -// does a follow b? +// does b follow a? static bool does_follow(int a, int b) { if (follows[a][b]) {