diff options
author | Alex Elder <elder@inktank.com> | 2012-05-26 23:26:43 -0500 |
---|---|---|
committer | Alex Elder <elder@dreamhost.com> | 2012-06-06 09:23:54 -0500 |
commit | 1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7 (patch) | |
tree | 32bbe82e2817619bf16516d8531a2e5b79e2528c /fs/ceph | |
parent | 20581c1faf7b15ae1f8b80c0ec757877b0b53151 (diff) | |
download | blackbird-op-linux-1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7.tar.gz blackbird-op-linux-1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7.zip |
libceph: fully initialize connection in con_init()
Move the initialization of a ceph connection's private pointer,
operations vector pointer, and peer name information into
ceph_con_init(). Rearrange the arguments so the connection pointer
is first. Hide the byte-swapping of the peer entity number inside
ceph_con_init()
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/mds_client.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index ad30261cd4c0..ecd7f15741c1 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -394,11 +394,8 @@ static struct ceph_mds_session *register_session(struct ceph_mds_client *mdsc, s->s_seq = 0; mutex_init(&s->s_mutex); - ceph_con_init(&mdsc->fsc->client->msgr, &s->s_con); - s->s_con.private = s; - s->s_con.ops = &mds_con_ops; - s->s_con.peer_name.type = CEPH_ENTITY_TYPE_MDS; - s->s_con.peer_name.num = cpu_to_le64(mds); + ceph_con_init(&s->s_con, s, &mds_con_ops, &mdsc->fsc->client->msgr, + CEPH_ENTITY_TYPE_MDS, mds); spin_lock_init(&s->s_gen_ttl_lock); s->s_cap_gen = 0; |