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 /net/ceph/mon_client.c | |
parent | 20581c1faf7b15ae1f8b80c0ec757877b0b53151 (diff) | |
download | linux-1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7.tar.bz2 |
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/mon_client.c')
-rw-r--r-- | net/ceph/mon_client.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index 6adbea78b168..ab6b24a5169e 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c @@ -142,11 +142,9 @@ static int __open_session(struct ceph_mon_client *monc) monc->sub_renew_after = jiffies; /* i.e., expired */ monc->want_next_osdmap = !!monc->want_next_osdmap; - ceph_con_init(&monc->client->msgr, &monc->con); - monc->con.private = monc; - monc->con.ops = &mon_con_ops; - monc->con.peer_name.type = CEPH_ENTITY_TYPE_MON; - monc->con.peer_name.num = cpu_to_le64(monc->cur_mon); + ceph_con_init(&monc->con, monc, &mon_con_ops, + &monc->client->msgr, + CEPH_ENTITY_TYPE_MON, monc->cur_mon); dout("open_session mon%d opening\n", monc->cur_mon); ceph_con_open(&monc->con, |