* mds: osdmap handling bugfix

* common/Thread.h: fixed stupid join() problem (again)


git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1349 29311d96-e01e-0410-9327-a35deaab8ce9
This commit is contained in:
sageweil 2007-04-26 18:46:26 +00:00
parent e0aa20439c
commit a511e19f5b
2 changed files with 16 additions and 11 deletions

View File

@ -16,6 +16,7 @@
#define __THREAD_H
#include <pthread.h>
#include <errno.h>
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)

View File

@ -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<int>::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<int>::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));
}
}