diff options
author | Sage Weil <sage@inktank.com> | 2013-06-08 14:02:46 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-18 16:59:03 -0700 |
commit | 1627102653390f9b53254b6c47fbc29190f78be5 (patch) | |
tree | 65249cd1c67ef31dcf3016b0d1f7cda062e2bcd4 | |
parent | 926b88e711d8b179f6a3a1a906e8cb9fbb4dbf21 (diff) | |
download | ceph-1627102653390f9b53254b6c47fbc29190f78be5.tar.gz |
debug refs on Connection
-rw-r--r-- | src/mon/Monitor.cc | 2 | ||||
-rw-r--r-- | src/msg/Message.h | 5 | ||||
-rw-r--r-- | src/msg/Pipe.cc | 2 | ||||
-rw-r--r-- | src/msg/SimpleMessenger.cc | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 90750dd7b11..e8db668e255 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -2303,7 +2303,7 @@ void Monitor::handle_forward(MForward *m) dout(0) << "forward from entity with insufficient caps! " << session->caps << dendl; } else { - Connection *c = new Connection(NULL); // msgr must be null; see PaxosService::dispatch() + Connection *c = new Connection(g_ceph_context, NULL); // msgr must be null; see PaxosService::dispatch() MonSession *s = new MonSession(m->msg->get_source_inst(), c); c->set_priv(s); c->set_peer_addr(m->client.addr); diff --git a/src/msg/Message.h b/src/msg/Message.h index ad2bc8249b7..12474f00519 100644 --- a/src/msg/Message.h +++ b/src/msg/Message.h @@ -182,8 +182,9 @@ struct Connection : private RefCountedObject { friend class boost::intrusive_ptr<Connection>; public: - Connection(Messenger *m) - : lock("Connection::lock"), + Connection(CephContext *cct, Messenger *m) + : RefCountedObject(cct), + lock("Connection::lock"), msgr(m), priv(NULL), peer_type(-1), diff --git a/src/msg/Pipe.cc b/src/msg/Pipe.cc index 03ee79a15c2..7d99be3b4d4 100644 --- a/src/msg/Pipe.cc +++ b/src/msg/Pipe.cc @@ -76,7 +76,7 @@ Pipe::Pipe(SimpleMessenger *r, int st, Connection *con) connection_state = con; connection_state->reset_pipe(this); } else { - connection_state = new Connection(msgr); + connection_state = new Connection(msgr->cct, msgr); connection_state->pipe = get(); } diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc index 441ed432af0..45b497cb45c 100644 --- a/src/msg/SimpleMessenger.cc +++ b/src/msg/SimpleMessenger.cc @@ -51,7 +51,7 @@ SimpleMessenger::SimpleMessenger(CephContext *cct, entity_name_t name, dispatch_throttler(cct, string("msgr_dispatch_throttler-") + mname, cct->_conf->ms_dispatch_throttle_bytes), reaper_started(false), reaper_stop(false), timeout(0), - local_connection(new Connection(this)) + local_connection(new Connection(cct, this)) { pthread_spin_init(&global_seq_lock, PTHREAD_PROCESS_PRIVATE); init_local_connection(); |