osd: debug Session refs

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2014-07-01 15:44:11 -07:00
parent 45991c055b
commit fc8d198049
2 changed files with 5 additions and 4 deletions

View File

@ -3691,7 +3691,7 @@ void OSD::ms_handle_fast_connect(Connection *con)
if (con->get_peer_type() != CEPH_ENTITY_TYPE_MON) {
Session *s = static_cast<Session*>(con->get_priv());
if (!s) {
s = new Session;
s = new Session(cct);
con->set_priv(s->get());
s->con = con;
dout(10) << " new session (outgoing)" << s << " con=" << s->con
@ -3709,7 +3709,7 @@ void OSD::ms_handle_fast_accept(Connection *con)
if (con->get_peer_type() != CEPH_ENTITY_TYPE_MON) {
Session *s = static_cast<Session*>(con->get_priv());
if (!s) {
s = new Session();
s = new Session(cct);
con->set_priv(s->get());
s->con = con;
dout(10) << "new session (incoming)" << s << " con=" << con
@ -5142,7 +5142,7 @@ bool OSD::ms_verify_authorizer(Connection *con, int peer_type,
if (isvalid) {
Session *s = static_cast<Session *>(con->get_priv());
if (!s) {
s = new Session;
s = new Session(cct);
con->set_priv(s->get());
s->con = con;
dout(10) << " new session " << s << " con=" << s->con << " addr=" << s->con->get_peer_addr() << dendl;

View File

@ -1152,7 +1152,8 @@ public:
Mutex received_map_lock;
epoch_t received_map_epoch; // largest epoch seen in MOSDMap from here
Session() :
Session(CephContext *cct) :
RefCountedObject(cct),
auid(-1), con(0),
session_dispatch_lock("Session::session_dispatch_lock"),
sent_epoch_lock("Session::sent_epoch_lock"), last_sent_epoch(0),