From 85dfe32cc78fa5f2d3bff5b8e99da91d04346ab4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 24 Mar 2010 21:48:05 -0700 Subject: [PATCH] --- yaml --- r: 198047 b: refs/heads/master c: 6694d6b95cf3b41751e78815d05968fa2084d7bf h: refs/heads/master i: 198045: b08b63c67042758184a9b6f98ed8b223bde26fd7 198043: 4487a23fe7d19347cb16f28e2fcacbcd0fc01964 198039: fbf4b5b847c079e4c3e29fdec4ad46b8a9e0d24a 198031: 7db3883e9eaca55cced9cf78d7307e8ef911a81b 198015: 9baf286869935a923fc321230e554e185e514cc8 v: v3 --- [refs] | 2 +- trunk/fs/ceph/mon_client.c | 19 ++++++++++++------- trunk/fs/ceph/mon_client.h | 5 ++--- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 4af04bb39e1e..9d225deff0c7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3143edd3a185f1fd370ebdd21b4151aa9f3283a3 +refs/heads/master: 6694d6b95cf3b41751e78815d05968fa2084d7bf diff --git a/trunk/fs/ceph/mon_client.c b/trunk/fs/ceph/mon_client.c index 43cfab06fcee..5a67732fa6e1 100644 --- a/trunk/fs/ceph/mon_client.c +++ b/trunk/fs/ceph/mon_client.c @@ -638,16 +638,21 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl) sizeof(struct ceph_mon_subscribe_ack), 1, false); if (err < 0) goto out_monmap; - err = ceph_msgpool_init(&monc->msgpool_auth_reply, 4096, 1, false); - if (err < 0) + + monc->m_auth_reply = ceph_msg_new(CEPH_MSG_AUTH_REPLY, 4096, 0, 0, + NULL); + if (IS_ERR(monc->m_auth_reply)) { + err = PTR_ERR(monc->m_auth_reply); + monc->m_auth_reply = NULL; goto out_pool; + } monc->m_auth = ceph_msg_new(CEPH_MSG_AUTH, 4096, 0, 0, NULL); monc->pending_auth = 0; if (IS_ERR(monc->m_auth)) { err = PTR_ERR(monc->m_auth); monc->m_auth = NULL; - goto out_pool3; + goto out_auth_reply; } monc->cur_mon = -1; @@ -665,8 +670,8 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl) monc->want_next_osdmap = 1; return 0; -out_pool3: - ceph_msgpool_destroy(&monc->msgpool_auth_reply); +out_auth_reply: + ceph_msg_put(monc->m_auth_reply); out_pool: ceph_msgpool_destroy(&monc->msgpool_subscribe_ack); out_monmap: @@ -692,8 +697,8 @@ void ceph_monc_stop(struct ceph_mon_client *monc) ceph_auth_destroy(monc->auth); ceph_msg_put(monc->m_auth); + ceph_msg_put(monc->m_auth_reply); ceph_msgpool_destroy(&monc->msgpool_subscribe_ack); - ceph_msgpool_destroy(&monc->msgpool_auth_reply); kfree(monc->monmap); } @@ -815,7 +820,7 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con, case CEPH_MSG_STATFS_REPLY: return get_statfs_reply(con, hdr, skip); case CEPH_MSG_AUTH_REPLY: - m = ceph_msgpool_get(&monc->msgpool_auth_reply, front_len); + m = ceph_msg_get(monc->m_auth_reply); break; case CEPH_MSG_MON_MAP: case CEPH_MSG_MDS_MAP: diff --git a/trunk/fs/ceph/mon_client.h b/trunk/fs/ceph/mon_client.h index cc89a86c8589..2658e3e3b27c 100644 --- a/trunk/fs/ceph/mon_client.h +++ b/trunk/fs/ceph/mon_client.h @@ -63,7 +63,7 @@ struct ceph_mon_client { struct delayed_work delayed_work; struct ceph_auth_client *auth; - struct ceph_msg *m_auth; + struct ceph_msg *m_auth, *m_auth_reply; int pending_auth; bool hunting; @@ -72,9 +72,8 @@ struct ceph_mon_client { struct ceph_connection *con; bool have_fsid; - /* msg pools */ + /* msgs */ struct ceph_msgpool msgpool_subscribe_ack; - struct ceph_msgpool msgpool_auth_reply; /* pending statfs requests */ struct rb_root statfs_request_tree;