aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/mon_client.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-05-27 00:26:43 -0400
committerAlex Elder <elder@dreamhost.com>2012-06-06 10:23:54 -0400
commit1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7 (patch)
tree32bbe82e2817619bf16516d8531a2e5b79e2528c /net/ceph/mon_client.c
parent20581c1faf7b15ae1f8b80c0ec757877b0b53151 (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 'net/ceph/mon_client.c')
-rw-r--r--net/ceph/mon_client.c8
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)
142 monc->sub_renew_after = jiffies; /* i.e., expired */ 142 monc->sub_renew_after = jiffies; /* i.e., expired */
143 monc->want_next_osdmap = !!monc->want_next_osdmap; 143 monc->want_next_osdmap = !!monc->want_next_osdmap;
144 144
145 ceph_con_init(&monc->client->msgr, &monc->con); 145 ceph_con_init(&monc->con, monc, &mon_con_ops,
146 monc->con.private = monc; 146 &monc->client->msgr,
147 monc->con.ops = &mon_con_ops; 147 CEPH_ENTITY_TYPE_MON, monc->cur_mon);
148 monc->con.peer_name.type = CEPH_ENTITY_TYPE_MON;
149 monc->con.peer_name.num = cpu_to_le64(monc->cur_mon);
150 148
151 dout("open_session mon%d opening\n", monc->cur_mon); 149 dout("open_session mon%d opening\n", monc->cur_mon);
152 ceph_con_open(&monc->con, 150 ceph_con_open(&monc->con,