Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198048
b: refs/heads/master
c: 7c315c5
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed May 17, 2010
1 parent 85dfe32 commit 08a4466
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6694d6b95cf3b41751e78815d05968fa2084d7bf
refs/heads/master: 7c315c552c7442eab73461de61dbcce579a31d3a
20 changes: 12 additions & 8 deletions trunk/fs/ceph/mon_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,17 +634,21 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl)
CEPH_ENTITY_TYPE_OSD | CEPH_ENTITY_TYPE_MDS;

/* msg pools */
err = ceph_msgpool_init(&monc->msgpool_subscribe_ack,
sizeof(struct ceph_mon_subscribe_ack), 1, false);
if (err < 0)
monc->m_subscribe_ack = ceph_msg_new(CEPH_MSG_MON_SUBSCRIBE_ACK,
sizeof(struct ceph_mon_subscribe_ack),
0, 0, NULL);
if (IS_ERR(monc->m_subscribe_ack)) {
err = PTR_ERR(monc->m_subscribe_ack);
monc->m_subscribe_ack = NULL;
goto out_monmap;
}

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;
goto out_subscribe_ack;
}

monc->m_auth = ceph_msg_new(CEPH_MSG_AUTH, 4096, 0, 0, NULL);
Expand Down Expand Up @@ -672,8 +676,8 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl)

out_auth_reply:
ceph_msg_put(monc->m_auth_reply);
out_pool:
ceph_msgpool_destroy(&monc->msgpool_subscribe_ack);
out_subscribe_ack:
ceph_msg_put(monc->m_subscribe_ack);
out_monmap:
kfree(monc->monmap);
out:
Expand All @@ -698,7 +702,7 @@ void ceph_monc_stop(struct ceph_mon_client *monc)

ceph_msg_put(monc->m_auth);
ceph_msg_put(monc->m_auth_reply);
ceph_msgpool_destroy(&monc->msgpool_subscribe_ack);
ceph_msg_put(monc->m_subscribe_ack);

kfree(monc->monmap);
}
Expand Down Expand Up @@ -815,7 +819,7 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con,

switch (type) {
case CEPH_MSG_MON_SUBSCRIBE_ACK:
m = ceph_msgpool_get(&monc->msgpool_subscribe_ack, front_len);
m = ceph_msg_get(monc->m_subscribe_ack);
break;
case CEPH_MSG_STATFS_REPLY:
return get_statfs_reply(con, hdr, skip);
Expand Down
6 changes: 1 addition & 5 deletions trunk/fs/ceph/mon_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <linux/rbtree.h>

#include "messenger.h"
#include "msgpool.h"

struct ceph_client;
struct ceph_mount_args;
Expand Down Expand Up @@ -63,7 +62,7 @@ struct ceph_mon_client {
struct delayed_work delayed_work;

struct ceph_auth_client *auth;
struct ceph_msg *m_auth, *m_auth_reply;
struct ceph_msg *m_auth, *m_auth_reply, *m_subscribe_ack;
int pending_auth;

bool hunting;
Expand All @@ -72,9 +71,6 @@ struct ceph_mon_client {
struct ceph_connection *con;
bool have_fsid;

/* msgs */
struct ceph_msgpool msgpool_subscribe_ack;

/* pending statfs requests */
struct rb_root statfs_request_tree;
int num_statfs_requests;
Expand Down

0 comments on commit 08a4466

Please sign in to comment.