Complete configuration initialization for special actions, and hold Resetter lock while running reset. Signed-off-by: Alexandre Oliva <oliva@xxxxxxxxxxxxxxxxx> --- src/ceph_mds.cc | 1 + src/mds/Resetter.cc | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/ceph_mds.cc b/src/ceph_mds.cc index acd88d2..23fafaf 100644 --- a/src/ceph_mds.cc +++ b/src/ceph_mds.cc @@ -65,6 +65,7 @@ void usage() static int do_cmds_special_action(const std::string &action, const std::string &dump_file, int rank) { + common_init_finish(g_ceph_context); SimpleMessenger *messenger = new SimpleMessenger(g_ceph_context); int r = messenger->bind(g_conf->public_addr, getpid()); if (r < 0) diff --git a/src/mds/Resetter.cc b/src/mds/Resetter.cc index a10845c..f759881 100644 --- a/src/mds/Resetter.cc +++ b/src/mds/Resetter.cc @@ -83,6 +83,7 @@ void Resetter::reset() bool done; int r; + this->lock.Lock(); lock.Lock(); journaler->recover(new C_SafeCond(&lock, &cond, &done, &r)); while (!done) @@ -142,5 +143,6 @@ void Resetter::reset() cout << "done" << std::endl; + this->lock.Unlock(); shutdown(); } -- 1.7.7.6 -- Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/ You must be the change you wish to see in the world. -- Gandhi Be Free! -- http://FSFLA.org/ FSF Latin America board member Free Software Evangelist Red Hat Brazil Compiler Engineer -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html