diff --git a/trunk/ceph/common/Thread.h b/trunk/ceph/common/Thread.h index e7feb1765be..43c5f57f4a9 100644 --- a/trunk/ceph/common/Thread.h +++ b/trunk/ceph/common/Thread.h @@ -16,6 +16,7 @@ #define __THREAD_H #include +#include class Thread { private: @@ -45,8 +46,11 @@ class Thread { } int join(void **prval = 0) { - //assert(thread_id); // for now - //if (thread_id == 0) return -1; // never started. + if (thread_id == 0) { + cerr << "WARNING: join on thread that was never started" << endl; + //assert(0); + return -EINVAL; // never started. + } int status = pthread_join(thread_id, prval); if (status == 0) diff --git a/trunk/ceph/mds/MDS.cc b/trunk/ceph/mds/MDS.cc index c27cc98214f..6d66b77cd95 100644 --- a/trunk/ceph/mds/MDS.cc +++ b/trunk/ceph/mds/MDS.cc @@ -573,6 +573,16 @@ void MDS::handle_osd_map(MOSDMap *m) dout(10) << "handle_osd_map had " << had << endl; + // pass on to clients + for (set::iterator it = clientmap.get_mount_set().begin(); + it != clientmap.get_mount_set().end(); + it++) { + MOSDMap *n = new MOSDMap; + n->maps = m->maps; + n->incremental_maps = m->incremental_maps; + messenger->send_message(n, clientmap.get_inst(*it)); + } + // process locally objecter->handle_osd_map(m); @@ -587,15 +597,6 @@ void MDS::handle_osd_map(MOSDMap *m) assert(is_standby()); } - // pass on to clients - for (set::iterator it = clientmap.get_mount_set().begin(); - it != clientmap.get_mount_set().end(); - it++) { - MOSDMap *n = new MOSDMap; - n->maps = m->maps; - n->incremental_maps = m->incremental_maps; - messenger->send_message(n, clientmap.get_inst(*it)); - } }