diff options
author | Alex Elder <elder@inktank.com> | 2012-05-27 08:26:43 +0400 |
---|---|---|
committer | Alex Elder <elder@dreamhost.com> | 2012-06-06 18:23:54 +0400 |
commit | 1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7 (patch) | |
tree | 32bbe82e2817619bf16516d8531a2e5b79e2528c /net/ceph/osd_client.c | |
parent | 20581c1faf7b15ae1f8b80c0ec757877b0b53151 (diff) | |
download | linux-1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7.tar.xz |
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 'net/ceph/osd_client.c')
-rw-r--r-- | net/ceph/osd_client.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 5b41a6929cd9..448c9da8beff 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -640,11 +640,8 @@ static struct ceph_osd *create_osd(struct ceph_osd_client *osdc, int onum) INIT_LIST_HEAD(&osd->o_osd_lru); osd->o_incarnation = 1; - ceph_con_init(&osdc->client->msgr, &osd->o_con); - osd->o_con.private = osd; - osd->o_con.ops = &osd_con_ops; - osd->o_con.peer_name.type = CEPH_ENTITY_TYPE_OSD; - osd->o_con.peer_name.num = cpu_to_le64(onum); + ceph_con_init(&osd->o_con, osd, &osd_con_ops, &osdc->client->msgr, + CEPH_ENTITY_TYPE_OSD, onum); INIT_LIST_HEAD(&osd->o_keepalive_item); return osd; |