summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-05-27 06:26:43 +0200
committerAlex Elder <elder@dreamhost.com>2012-06-06 16:23:54 +0200
commit1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7 (patch)
tree32bbe82e2817619bf16516d8531a2e5b79e2528c /fs/ceph
parentlibceph: init monitor connection when opening (diff)
downloadlinux-1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7.tar.xz
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.c7
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;