mirror of
https://github.com/ceph/ceph
synced 2025-02-24 11:37:37 +00:00
msgr: Rename SimpleMessenger::start(daemonize, nonce) to start_with_nonce.
Otherwise, once we remove daemonize from the prototype, all the existing ->start(false) calls will be taken to mean nonce=0. Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
This commit is contained in:
parent
84454c24d1
commit
0e6bacc6e7
@ -118,7 +118,7 @@ int main(int argc, const char **argv, const char *envp[]) {
|
||||
|
||||
cout << "cfuse[" << getpid() << "]: starting ceph client" << std::endl;
|
||||
|
||||
messenger->start(false, getpid()); // Do not daemonize here
|
||||
messenger->start_with_nonce(false, getpid()); // Do not daemonize here
|
||||
|
||||
// start client
|
||||
client->init();
|
||||
|
@ -93,7 +93,7 @@ public:
|
||||
return -1002;
|
||||
}
|
||||
|
||||
if (messenger->start(false, msgr_nonce) != 0) {
|
||||
if (messenger->start_with_nonce(false, msgr_nonce) != 0) {
|
||||
shutdown();
|
||||
return -1003;
|
||||
}
|
||||
|
@ -649,7 +649,7 @@ connect()
|
||||
rados_instance.inc();
|
||||
nonce = getpid() + (1000000 * (uint64_t)rados_instance.read());
|
||||
|
||||
messenger->start(false, nonce); // do not daemonize
|
||||
messenger->start_with_nonce(false, nonce); // do not daemonize
|
||||
messenger->add_dispatcher_head(this);
|
||||
|
||||
dout(1) << "setting wanted keys" << dendl;
|
||||
|
@ -56,7 +56,7 @@ void Dumper::init(int rank)
|
||||
|
||||
messenger->register_entity(entity_name_t::CLIENT());
|
||||
messenger->add_dispatcher_head(this);
|
||||
messenger->start(false, getpid()); // do not daemonize
|
||||
messenger->start_with_nonce(false, getpid()); // do not daemonize
|
||||
|
||||
monc->set_want_keys(CEPH_ENTITY_TYPE_MON|CEPH_ENTITY_TYPE_OSD|CEPH_ENTITY_TYPE_MDS);
|
||||
monc->set_messenger(messenger);
|
||||
|
@ -50,7 +50,7 @@ void Resetter::init(int rank)
|
||||
|
||||
messenger->register_entity(entity_name_t::CLIENT());
|
||||
messenger->add_dispatcher_head(this);
|
||||
messenger->start(false, getpid());
|
||||
messenger->start_with_nonce(false, getpid());
|
||||
|
||||
monc->set_want_keys(CEPH_ENTITY_TYPE_MON|CEPH_ENTITY_TYPE_OSD|CEPH_ENTITY_TYPE_MDS);
|
||||
monc->set_messenger(messenger);
|
||||
|
@ -189,7 +189,7 @@ int MonClient::get_monmap_privately()
|
||||
messenger = smessenger = new SimpleMessenger();
|
||||
smessenger->register_entity(entity_name_t::CLIENT(-1));
|
||||
messenger->add_dispatcher_head(this);
|
||||
smessenger->start(false, getpid()); // do not daemonize!
|
||||
smessenger->start_with_nonce(false, getpid()); // do not daemonize!
|
||||
temp_msgr = true;
|
||||
}
|
||||
|
||||
|
@ -2317,7 +2317,7 @@ int SimpleMessenger::rebind(int avoid_port)
|
||||
return accepter.rebind(avoid_port);
|
||||
}
|
||||
|
||||
int SimpleMessenger::start(bool daemonize, uint64_t nonce)
|
||||
int SimpleMessenger::start_with_nonce(bool daemonize, uint64_t nonce)
|
||||
{
|
||||
lock.Lock();
|
||||
dout(1) << "messenger.start" << dendl;
|
||||
|
@ -564,10 +564,10 @@ public:
|
||||
int bind(uint64_t nonce) {
|
||||
return bind(g_conf.public_addr, nonce);
|
||||
}
|
||||
int start(bool daemonize, uint64_t nonce); // if we didn't bind
|
||||
int start_with_nonce(bool daemonize, uint64_t nonce); // if we didn't bind
|
||||
int start(bool daemonize) { // if we did
|
||||
assert(did_bind);
|
||||
return start(daemonize, 0);
|
||||
return start_with_nonce(daemonize, 0);
|
||||
}
|
||||
void wait();
|
||||
|
||||
|
@ -523,7 +523,7 @@ int ceph_tool_common_init(ceph_tool_mode_t mode)
|
||||
// start up network
|
||||
messenger = new SimpleMessenger();
|
||||
messenger->register_entity(entity_name_t::CLIENT());
|
||||
messenger->start(false, getpid()); // do not daemonize
|
||||
messenger->start_with_nonce(false, getpid()); // do not daemonize
|
||||
messenger->add_dispatcher_head(&dispatcher);
|
||||
|
||||
g.lock.Lock();
|
||||
|
Loading…
Reference in New Issue
Block a user