summaryrefslogtreecommitdiff
path: root/net/ceph/osd_client.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-05-27 04:26:43 (GMT)
committerAlex Elder <elder@dreamhost.com>2012-06-06 14:23:54 (GMT)
commit1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7 (patch)
tree32bbe82e2817619bf16516d8531a2e5b79e2528c /net/ceph/osd_client.c
parent20581c1faf7b15ae1f8b80c0ec757877b0b53151 (diff)
downloadlinux-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.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 5b41a69..448c9da 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;