diff --git a/trunk/ceph/mds/MDS.cc b/trunk/ceph/mds/MDS.cc index c7b31cc4de0..298c50bf5ac 100644 --- a/trunk/ceph/mds/MDS.cc +++ b/trunk/ceph/mds/MDS.cc @@ -440,12 +440,6 @@ void MDS::handle_mds_map(MMDSMap *m) // decode and process mdsmap->decode(m->get_encoded()); - // tell objecter my incarnation - if (objecter->get_client_incarnation() < 0) { - assert(mdsmap->get_inc(whoami) > 0); - objecter->set_client_incarnation(mdsmap->get_inc(whoami)); - } - // see who i am whoami = mdsmap->get_inst_rank(messenger->get_myaddr()); if (oldwhoami != whoami) { @@ -466,6 +460,13 @@ void MDS::handle_mds_map(MMDSMap *m) } } + // tell objecter my incarnation + if (objecter->get_client_incarnation() < 0 && + mdsmap->have_inst(whoami)) { + assert(mdsmap->get_inc(whoami) > 0); + objecter->set_client_incarnation(mdsmap->get_inc(whoami)); + } + // update my state state = mdsmap->get_state(whoami);