Message ID | 20180712084508.24131-2-cgxu519@gmx.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Jul 12, 2018 at 4:47 PM Chengguang Xu <cgxu519@gmx.com> wrote: > > We print session's refcount in debug message inside > ceph_put_mds_session() and get_session(), so don't > have to print it in con_get()/__ceph_lookup_mds_session()/con_put(). > > Signed-off-by: Chengguang Xu <cgxu519@gmx.com> > --- > Sorry, I just wrote wrong email address in previous sending, so resend it. > If you have received previous email please ignore it, thanks. > > fs/ceph/mds_client.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c > index 2a8d4cc69eb6..fc2d1c8ecfd2 100644 > --- a/fs/ceph/mds_client.c > +++ b/fs/ceph/mds_client.c > @@ -433,8 +433,6 @@ struct ceph_mds_session *__ceph_lookup_mds_session(struct ceph_mds_client *mdsc, > if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) > return NULL; > session = mdsc->sessions[mds]; > - dout("lookup_mds_session %p %d\n", session, > - refcount_read(&session->s_ref)); > get_session(session); > return session; > } > @@ -4080,11 +4078,8 @@ static struct ceph_connection *con_get(struct ceph_connection *con) > { > struct ceph_mds_session *s = con->private; > > - if (get_session(s)) { > - dout("mdsc con_get %p ok (%d)\n", s, refcount_read(&s->s_ref)); > + if (get_session(s)) > return con; > - } > - dout("mdsc con_get %p FAIL\n", s); > return NULL; > } > > @@ -4092,7 +4087,6 @@ static void con_put(struct ceph_connection *con) > { > struct ceph_mds_session *s = con->private; > > - dout("mdsc con_put %p (%d)\n", s, refcount_read(&s->s_ref) - 1); > ceph_put_mds_session(s); > } > Applied, thanks Yan, Zheng > -- > 2.17.1 > > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 2a8d4cc69eb6..fc2d1c8ecfd2 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -433,8 +433,6 @@ struct ceph_mds_session *__ceph_lookup_mds_session(struct ceph_mds_client *mdsc, if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) return NULL; session = mdsc->sessions[mds]; - dout("lookup_mds_session %p %d\n", session, - refcount_read(&session->s_ref)); get_session(session); return session; } @@ -4080,11 +4078,8 @@ static struct ceph_connection *con_get(struct ceph_connection *con) { struct ceph_mds_session *s = con->private; - if (get_session(s)) { - dout("mdsc con_get %p ok (%d)\n", s, refcount_read(&s->s_ref)); + if (get_session(s)) return con; - } - dout("mdsc con_get %p FAIL\n", s); return NULL; } @@ -4092,7 +4087,6 @@ static void con_put(struct ceph_connection *con) { struct ceph_mds_session *s = con->private; - dout("mdsc con_put %p (%d)\n", s, refcount_read(&s->s_ref) - 1); ceph_put_mds_session(s); }
We print session's refcount in debug message inside ceph_put_mds_session() and get_session(), so don't have to print it in con_get()/__ceph_lookup_mds_session()/con_put(). Signed-off-by: Chengguang Xu <cgxu519@gmx.com> --- Sorry, I just wrote wrong email address in previous sending, so resend it. If you have received previous email please ignore it, thanks. fs/ceph/mds_client.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)