diff options
author | Alex Elder <elder@inktank.com> | 2012-05-27 00:26:43 -0400 |
---|---|---|
committer | Alex Elder <elder@dreamhost.com> | 2012-06-06 10:23:54 -0400 |
commit | 1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7 (patch) | |
tree | 32bbe82e2817619bf16516d8531a2e5b79e2528c /fs/ceph | |
parent | 20581c1faf7b15ae1f8b80c0ec757877b0b53151 (diff) |
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, | |||
394 | s->s_seq = 0; | 394 | s->s_seq = 0; |
395 | mutex_init(&s->s_mutex); | 395 | mutex_init(&s->s_mutex); |
396 | 396 | ||
397 | ceph_con_init(&mdsc->fsc->client->msgr, &s->s_con); | 397 | ceph_con_init(&s->s_con, s, &mds_con_ops, &mdsc->fsc->client->msgr, |
398 | s->s_con.private = s; | 398 | CEPH_ENTITY_TYPE_MDS, mds); |
399 | s->s_con.ops = &mds_con_ops; | ||
400 | s->s_con.peer_name.type = CEPH_ENTITY_TYPE_MDS; | ||
401 | s->s_con.peer_name.num = cpu_to_le64(mds); | ||
402 | 399 | ||
403 | spin_lock_init(&s->s_gen_ttl_lock); | 400 | spin_lock_init(&s->s_gen_ttl_lock); |
404 | s->s_cap_gen = 0; | 401 | s->s_cap_gen = 0; |