Lines Matching refs:monc
37 static int __validate_auth(struct ceph_mon_client *monc);
104 static void __send_prepared_auth_request(struct ceph_mon_client *monc, int len) in __send_prepared_auth_request() argument
106 monc->pending_auth = 1; in __send_prepared_auth_request()
107 monc->m_auth->front.iov_len = len; in __send_prepared_auth_request()
108 monc->m_auth->hdr.front_len = cpu_to_le32(len); in __send_prepared_auth_request()
109 ceph_msg_revoke(monc->m_auth); in __send_prepared_auth_request()
110 ceph_msg_get(monc->m_auth); /* keep our ref */ in __send_prepared_auth_request()
111 ceph_con_send(&monc->con, monc->m_auth); in __send_prepared_auth_request()
117 static void __close_session(struct ceph_mon_client *monc) in __close_session() argument
119 dout("__close_session closing mon%d\n", monc->cur_mon); in __close_session()
120 ceph_msg_revoke(monc->m_auth); in __close_session()
121 ceph_msg_revoke_incoming(monc->m_auth_reply); in __close_session()
122 ceph_msg_revoke(monc->m_subscribe); in __close_session()
123 ceph_msg_revoke_incoming(monc->m_subscribe_ack); in __close_session()
124 ceph_con_close(&monc->con); in __close_session()
126 monc->pending_auth = 0; in __close_session()
127 ceph_auth_reset(monc->auth); in __close_session()
134 static void pick_new_mon(struct ceph_mon_client *monc) in pick_new_mon() argument
136 int old_mon = monc->cur_mon; in pick_new_mon()
138 BUG_ON(monc->monmap->num_mon < 1); in pick_new_mon()
140 if (monc->monmap->num_mon == 1) { in pick_new_mon()
141 monc->cur_mon = 0; in pick_new_mon()
143 int max = monc->monmap->num_mon; in pick_new_mon()
147 if (monc->cur_mon >= 0) { in pick_new_mon()
148 if (monc->cur_mon < monc->monmap->num_mon) in pick_new_mon()
149 o = monc->cur_mon; in pick_new_mon()
158 monc->cur_mon = n; in pick_new_mon()
162 monc->cur_mon, monc->monmap->num_mon); in pick_new_mon()
168 static void __open_session(struct ceph_mon_client *monc) in __open_session() argument
172 pick_new_mon(monc); in __open_session()
174 monc->hunting = true; in __open_session()
175 if (monc->had_a_connection) { in __open_session()
176 monc->hunt_mult *= CEPH_MONC_HUNT_BACKOFF; in __open_session()
177 if (monc->hunt_mult > CEPH_MONC_HUNT_MAX_MULT) in __open_session()
178 monc->hunt_mult = CEPH_MONC_HUNT_MAX_MULT; in __open_session()
181 monc->sub_renew_after = jiffies; /* i.e., expired */ in __open_session()
182 monc->sub_renew_sent = 0; in __open_session()
184 dout("%s opening mon%d\n", __func__, monc->cur_mon); in __open_session()
185 ceph_con_open(&monc->con, CEPH_ENTITY_TYPE_MON, monc->cur_mon, in __open_session()
186 &monc->monmap->mon_inst[monc->cur_mon].addr); in __open_session()
192 ceph_con_keepalive(&monc->con); in __open_session()
195 ret = ceph_auth_build_hello(monc->auth, in __open_session()
196 monc->m_auth->front.iov_base, in __open_session()
197 monc->m_auth->front_alloc_len); in __open_session()
199 __send_prepared_auth_request(monc, ret); in __open_session()
202 static void reopen_session(struct ceph_mon_client *monc) in reopen_session() argument
204 if (!monc->hunting) in reopen_session()
206 monc->cur_mon, ceph_pr_addr(&monc->con.peer_addr.in_addr)); in reopen_session()
208 __close_session(monc); in reopen_session()
209 __open_session(monc); in reopen_session()
212 static void un_backoff(struct ceph_mon_client *monc) in un_backoff() argument
214 monc->hunt_mult /= 2; /* reduce by 50% */ in un_backoff()
215 if (monc->hunt_mult < 1) in un_backoff()
216 monc->hunt_mult = 1; in un_backoff()
217 dout("%s hunt_mult now %d\n", __func__, monc->hunt_mult); in un_backoff()
223 static void __schedule_delayed(struct ceph_mon_client *monc) in __schedule_delayed() argument
227 if (monc->hunting) in __schedule_delayed()
228 delay = CEPH_MONC_HUNT_INTERVAL * monc->hunt_mult; in __schedule_delayed()
233 mod_delayed_work(system_wq, &monc->delayed_work, in __schedule_delayed()
248 static void __send_subscribe(struct ceph_mon_client *monc) in __send_subscribe() argument
250 struct ceph_msg *msg = monc->m_subscribe; in __send_subscribe()
256 dout("%s sent %lu\n", __func__, monc->sub_renew_sent); in __send_subscribe()
258 BUG_ON(monc->cur_mon < 0); in __send_subscribe()
260 if (!monc->sub_renew_sent) in __send_subscribe()
261 monc->sub_renew_sent = jiffies | 1; /* never 0 */ in __send_subscribe()
265 for (i = 0; i < ARRAY_SIZE(monc->subs); i++) { in __send_subscribe()
266 if (monc->subs[i].want) in __send_subscribe()
271 for (i = 0; i < ARRAY_SIZE(monc->subs); i++) { in __send_subscribe()
275 if (!monc->subs[i].want) in __send_subscribe()
280 monc->fs_cluster_id != CEPH_FS_CLUSTER_ID_NONE) in __send_subscribe()
281 len += sprintf(buf + len, ".%d", monc->fs_cluster_id); in __send_subscribe()
284 le64_to_cpu(monc->subs[i].item.start), in __send_subscribe()
285 monc->subs[i].item.flags); in __send_subscribe()
287 memcpy(p, &monc->subs[i].item, sizeof(monc->subs[i].item)); in __send_subscribe()
288 p += sizeof(monc->subs[i].item); in __send_subscribe()
295 ceph_con_send(&monc->con, ceph_msg_get(msg)); in __send_subscribe()
298 static void handle_subscribe_ack(struct ceph_mon_client *monc, in handle_subscribe_ack() argument
308 mutex_lock(&monc->mutex); in handle_subscribe_ack()
309 if (monc->sub_renew_sent) { in handle_subscribe_ack()
314 monc->sub_renew_after = monc->sub_renew_sent + in handle_subscribe_ack()
317 monc->sub_renew_sent, seconds, monc->sub_renew_after); in handle_subscribe_ack()
318 monc->sub_renew_sent = 0; in handle_subscribe_ack()
321 monc->sub_renew_sent, monc->sub_renew_after); in handle_subscribe_ack()
323 mutex_unlock(&monc->mutex); in handle_subscribe_ack()
336 static bool __ceph_monc_want_map(struct ceph_mon_client *monc, int sub, in __ceph_monc_want_map() argument
345 if (monc->subs[sub].want && in __ceph_monc_want_map()
346 monc->subs[sub].item.start == start && in __ceph_monc_want_map()
347 monc->subs[sub].item.flags == flags) in __ceph_monc_want_map()
350 monc->subs[sub].item.start = start; in __ceph_monc_want_map()
351 monc->subs[sub].item.flags = flags; in __ceph_monc_want_map()
352 monc->subs[sub].want = true; in __ceph_monc_want_map()
357 bool ceph_monc_want_map(struct ceph_mon_client *monc, int sub, u32 epoch, in ceph_monc_want_map() argument
362 mutex_lock(&monc->mutex); in ceph_monc_want_map()
363 need_request = __ceph_monc_want_map(monc, sub, epoch, continuous); in ceph_monc_want_map()
364 mutex_unlock(&monc->mutex); in ceph_monc_want_map()
375 static void __ceph_monc_got_map(struct ceph_mon_client *monc, int sub, in __ceph_monc_got_map() argument
380 if (monc->subs[sub].want) { in __ceph_monc_got_map()
381 if (monc->subs[sub].item.flags & CEPH_SUBSCRIBE_ONETIME) in __ceph_monc_got_map()
382 monc->subs[sub].want = false; in __ceph_monc_got_map()
384 monc->subs[sub].item.start = cpu_to_le64(epoch + 1); in __ceph_monc_got_map()
387 monc->subs[sub].have = epoch; in __ceph_monc_got_map()
390 void ceph_monc_got_map(struct ceph_mon_client *monc, int sub, u32 epoch) in ceph_monc_got_map() argument
392 mutex_lock(&monc->mutex); in ceph_monc_got_map()
393 __ceph_monc_got_map(monc, sub, epoch); in ceph_monc_got_map()
394 mutex_unlock(&monc->mutex); in ceph_monc_got_map()
398 void ceph_monc_renew_subs(struct ceph_mon_client *monc) in ceph_monc_renew_subs() argument
400 mutex_lock(&monc->mutex); in ceph_monc_renew_subs()
401 __send_subscribe(monc); in ceph_monc_renew_subs()
402 mutex_unlock(&monc->mutex); in ceph_monc_renew_subs()
412 int ceph_monc_wait_osdmap(struct ceph_mon_client *monc, u32 epoch, in ceph_monc_wait_osdmap() argument
418 mutex_lock(&monc->mutex); in ceph_monc_wait_osdmap()
419 while (monc->subs[CEPH_SUB_OSDMAP].have < epoch) { in ceph_monc_wait_osdmap()
420 mutex_unlock(&monc->mutex); in ceph_monc_wait_osdmap()
425 ret = wait_event_interruptible_timeout(monc->client->auth_wq, in ceph_monc_wait_osdmap()
426 monc->subs[CEPH_SUB_OSDMAP].have >= epoch, in ceph_monc_wait_osdmap()
431 mutex_lock(&monc->mutex); in ceph_monc_wait_osdmap()
434 mutex_unlock(&monc->mutex); in ceph_monc_wait_osdmap()
443 int ceph_monc_open_session(struct ceph_mon_client *monc) in ceph_monc_open_session() argument
445 mutex_lock(&monc->mutex); in ceph_monc_open_session()
446 __ceph_monc_want_map(monc, CEPH_SUB_MONMAP, 0, true); in ceph_monc_open_session()
447 __ceph_monc_want_map(monc, CEPH_SUB_OSDMAP, 0, false); in ceph_monc_open_session()
448 __open_session(monc); in ceph_monc_open_session()
449 __schedule_delayed(monc); in ceph_monc_open_session()
450 mutex_unlock(&monc->mutex); in ceph_monc_open_session()
455 static void ceph_monc_handle_map(struct ceph_mon_client *monc, in ceph_monc_handle_map() argument
458 struct ceph_client *client = monc->client; in ceph_monc_handle_map()
459 struct ceph_monmap *monmap = NULL, *old = monc->monmap; in ceph_monc_handle_map()
462 mutex_lock(&monc->mutex); in ceph_monc_handle_map()
475 if (ceph_check_fsid(monc->client, &monmap->fsid) < 0) { in ceph_monc_handle_map()
480 client->monc.monmap = monmap; in ceph_monc_handle_map()
483 __ceph_monc_got_map(monc, CEPH_SUB_MONMAP, monc->monmap->epoch); in ceph_monc_handle_map()
487 mutex_unlock(&monc->mutex); in ceph_monc_handle_map()
525 alloc_generic_request(struct ceph_mon_client *monc, gfp_t gfp) in alloc_generic_request() argument
533 req->monc = monc; in alloc_generic_request()
544 struct ceph_mon_client *monc = req->monc; in register_generic_request() local
549 req->tid = ++monc->last_tid; in register_generic_request()
550 insert_generic_request(&monc->generic_request_tree, req); in register_generic_request()
553 static void send_generic_request(struct ceph_mon_client *monc, in send_generic_request() argument
560 ceph_con_send(&monc->con, ceph_msg_get(req->request)); in send_generic_request()
565 struct ceph_mon_client *monc = req->monc; in __finish_generic_request() local
568 erase_generic_request(&monc->generic_request_tree, req); in __finish_generic_request()
591 struct ceph_mon_client *monc = req->monc; in cancel_generic_request() local
596 mutex_lock(&monc->mutex); in cancel_generic_request()
597 lookup_req = lookup_generic_request(&monc->generic_request_tree, in cancel_generic_request()
604 mutex_unlock(&monc->mutex); in cancel_generic_request()
625 struct ceph_mon_client *monc = con->private; in get_generic_reply() local
630 mutex_lock(&monc->mutex); in get_generic_reply()
631 req = lookup_generic_request(&monc->generic_request_tree, tid); in get_generic_reply()
646 mutex_unlock(&monc->mutex); in get_generic_reply()
653 static void handle_statfs_reply(struct ceph_mon_client *monc, in handle_statfs_reply() argument
665 mutex_lock(&monc->mutex); in handle_statfs_reply()
666 req = lookup_generic_request(&monc->generic_request_tree, tid); in handle_statfs_reply()
668 mutex_unlock(&monc->mutex); in handle_statfs_reply()
675 mutex_unlock(&monc->mutex); in handle_statfs_reply()
688 int ceph_monc_do_statfs(struct ceph_mon_client *monc, u64 data_pool, in ceph_monc_do_statfs() argument
695 req = alloc_generic_request(monc, GFP_NOFS); in ceph_monc_do_statfs()
711 mutex_lock(&monc->mutex); in ceph_monc_do_statfs()
718 h->fsid = monc->monmap->fsid; in ceph_monc_do_statfs()
721 send_generic_request(monc, req); in ceph_monc_do_statfs()
722 mutex_unlock(&monc->mutex); in ceph_monc_do_statfs()
731 static void handle_get_version_reply(struct ceph_mon_client *monc, in handle_get_version_reply() argument
747 mutex_lock(&monc->mutex); in handle_get_version_reply()
748 req = lookup_generic_request(&monc->generic_request_tree, handle); in handle_get_version_reply()
750 mutex_unlock(&monc->mutex); in handle_get_version_reply()
757 mutex_unlock(&monc->mutex); in handle_get_version_reply()
768 __ceph_monc_get_version(struct ceph_mon_client *monc, const char *what, in __ceph_monc_get_version() argument
773 req = alloc_generic_request(monc, GFP_NOIO); in __ceph_monc_get_version()
791 mutex_lock(&monc->mutex); in __ceph_monc_get_version()
801 send_generic_request(monc, req); in __ceph_monc_get_version()
802 mutex_unlock(&monc->mutex); in __ceph_monc_get_version()
816 int ceph_monc_get_version(struct ceph_mon_client *monc, const char *what, in ceph_monc_get_version() argument
822 req = __ceph_monc_get_version(monc, what, NULL, 0); in ceph_monc_get_version()
840 int ceph_monc_get_version_async(struct ceph_mon_client *monc, const char *what, in ceph_monc_get_version_async() argument
845 req = __ceph_monc_get_version(monc, what, cb, private_data); in ceph_monc_get_version_async()
854 static void handle_command_ack(struct ceph_mon_client *monc, in handle_command_ack() argument
868 mutex_lock(&monc->mutex); in handle_command_ack()
869 req = lookup_generic_request(&monc->generic_request_tree, tid); in handle_command_ack()
871 mutex_unlock(&monc->mutex); in handle_command_ack()
877 mutex_unlock(&monc->mutex); in handle_command_ack()
887 int ceph_monc_blacklist_add(struct ceph_mon_client *monc, in ceph_monc_blacklist_add() argument
895 req = alloc_generic_request(monc, GFP_NOIO); in ceph_monc_blacklist_add()
908 mutex_lock(&monc->mutex); in ceph_monc_blacklist_add()
914 h->fsid = monc->monmap->fsid; in ceph_monc_blacklist_add()
921 send_generic_request(monc, req); in ceph_monc_blacklist_add()
922 mutex_unlock(&monc->mutex); in ceph_monc_blacklist_add()
934 static void __resend_generic_request(struct ceph_mon_client *monc) in __resend_generic_request() argument
939 for (p = rb_first(&monc->generic_request_tree); p; p = rb_next(p)) { in __resend_generic_request()
943 ceph_con_send(&monc->con, ceph_msg_get(req->request)); in __resend_generic_request()
954 struct ceph_mon_client *monc = in delayed_work() local
958 mutex_lock(&monc->mutex); in delayed_work()
959 if (monc->hunting) { in delayed_work()
961 reopen_session(monc); in delayed_work()
963 int is_auth = ceph_auth_is_authenticated(monc->auth); in delayed_work()
964 if (ceph_con_keepalive_expired(&monc->con, in delayed_work()
968 reopen_session(monc); in delayed_work()
971 if (!monc->hunting) { in delayed_work()
972 ceph_con_keepalive(&monc->con); in delayed_work()
973 __validate_auth(monc); in delayed_work()
974 un_backoff(monc); in delayed_work()
978 !(monc->con.peer_features & CEPH_FEATURE_MON_STATEFUL_SUB)) { in delayed_work()
982 __func__, now, monc->sub_renew_after); in delayed_work()
983 if (time_after_eq(now, monc->sub_renew_after)) in delayed_work()
984 __send_subscribe(monc); in delayed_work()
987 __schedule_delayed(monc); in delayed_work()
988 mutex_unlock(&monc->mutex); in delayed_work()
995 static int build_initial_monmap(struct ceph_mon_client *monc) in build_initial_monmap() argument
997 struct ceph_options *opt = monc->client->options; in build_initial_monmap()
1003 monc->monmap = kzalloc(struct_size(monc->monmap, mon_inst, num_mon), in build_initial_monmap()
1005 if (!monc->monmap) in build_initial_monmap()
1008 monc->monmap->mon_inst[i].addr = mon_addr[i]; in build_initial_monmap()
1009 monc->monmap->mon_inst[i].addr.nonce = 0; in build_initial_monmap()
1010 monc->monmap->mon_inst[i].name.type = in build_initial_monmap()
1012 monc->monmap->mon_inst[i].name.num = cpu_to_le64(i); in build_initial_monmap()
1014 monc->monmap->num_mon = num_mon; in build_initial_monmap()
1018 int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl) in ceph_monc_init() argument
1023 memset(monc, 0, sizeof(*monc)); in ceph_monc_init()
1024 monc->client = cl; in ceph_monc_init()
1025 monc->monmap = NULL; in ceph_monc_init()
1026 mutex_init(&monc->mutex); in ceph_monc_init()
1028 err = build_initial_monmap(monc); in ceph_monc_init()
1034 monc->auth = ceph_auth_init(cl->options->name, in ceph_monc_init()
1036 if (IS_ERR(monc->auth)) { in ceph_monc_init()
1037 err = PTR_ERR(monc->auth); in ceph_monc_init()
1040 monc->auth->want_keys = in ceph_monc_init()
1046 monc->m_subscribe_ack = ceph_msg_new(CEPH_MSG_MON_SUBSCRIBE_ACK, in ceph_monc_init()
1049 if (!monc->m_subscribe_ack) in ceph_monc_init()
1052 monc->m_subscribe = ceph_msg_new(CEPH_MSG_MON_SUBSCRIBE, 128, in ceph_monc_init()
1054 if (!monc->m_subscribe) in ceph_monc_init()
1057 monc->m_auth_reply = ceph_msg_new(CEPH_MSG_AUTH_REPLY, 4096, in ceph_monc_init()
1059 if (!monc->m_auth_reply) in ceph_monc_init()
1062 monc->m_auth = ceph_msg_new(CEPH_MSG_AUTH, 4096, GFP_KERNEL, true); in ceph_monc_init()
1063 monc->pending_auth = 0; in ceph_monc_init()
1064 if (!monc->m_auth) in ceph_monc_init()
1067 ceph_con_init(&monc->con, monc, &mon_con_ops, in ceph_monc_init()
1068 &monc->client->msgr); in ceph_monc_init()
1070 monc->cur_mon = -1; in ceph_monc_init()
1071 monc->had_a_connection = false; in ceph_monc_init()
1072 monc->hunt_mult = 1; in ceph_monc_init()
1074 INIT_DELAYED_WORK(&monc->delayed_work, delayed_work); in ceph_monc_init()
1075 monc->generic_request_tree = RB_ROOT; in ceph_monc_init()
1076 monc->last_tid = 0; in ceph_monc_init()
1078 monc->fs_cluster_id = CEPH_FS_CLUSTER_ID_NONE; in ceph_monc_init()
1083 ceph_msg_put(monc->m_auth_reply); in ceph_monc_init()
1085 ceph_msg_put(monc->m_subscribe); in ceph_monc_init()
1087 ceph_msg_put(monc->m_subscribe_ack); in ceph_monc_init()
1089 ceph_auth_destroy(monc->auth); in ceph_monc_init()
1091 kfree(monc->monmap); in ceph_monc_init()
1097 void ceph_monc_stop(struct ceph_mon_client *monc) in ceph_monc_stop() argument
1100 cancel_delayed_work_sync(&monc->delayed_work); in ceph_monc_stop()
1102 mutex_lock(&monc->mutex); in ceph_monc_stop()
1103 __close_session(monc); in ceph_monc_stop()
1104 monc->cur_mon = -1; in ceph_monc_stop()
1105 mutex_unlock(&monc->mutex); in ceph_monc_stop()
1115 ceph_auth_destroy(monc->auth); in ceph_monc_stop()
1117 WARN_ON(!RB_EMPTY_ROOT(&monc->generic_request_tree)); in ceph_monc_stop()
1119 ceph_msg_put(monc->m_auth); in ceph_monc_stop()
1120 ceph_msg_put(monc->m_auth_reply); in ceph_monc_stop()
1121 ceph_msg_put(monc->m_subscribe); in ceph_monc_stop()
1122 ceph_msg_put(monc->m_subscribe_ack); in ceph_monc_stop()
1124 kfree(monc->monmap); in ceph_monc_stop()
1128 static void finish_hunting(struct ceph_mon_client *monc) in finish_hunting() argument
1130 if (monc->hunting) { in finish_hunting()
1131 dout("%s found mon%d\n", __func__, monc->cur_mon); in finish_hunting()
1132 monc->hunting = false; in finish_hunting()
1133 monc->had_a_connection = true; in finish_hunting()
1134 un_backoff(monc); in finish_hunting()
1135 __schedule_delayed(monc); in finish_hunting()
1139 static void handle_auth_reply(struct ceph_mon_client *monc, in handle_auth_reply() argument
1145 mutex_lock(&monc->mutex); in handle_auth_reply()
1146 was_auth = ceph_auth_is_authenticated(monc->auth); in handle_auth_reply()
1147 monc->pending_auth = 0; in handle_auth_reply()
1148 ret = ceph_handle_auth_reply(monc->auth, msg->front.iov_base, in handle_auth_reply()
1150 monc->m_auth->front.iov_base, in handle_auth_reply()
1151 monc->m_auth->front_alloc_len); in handle_auth_reply()
1153 __send_prepared_auth_request(monc, ret); in handle_auth_reply()
1157 finish_hunting(monc); in handle_auth_reply()
1160 monc->client->auth_err = ret; in handle_auth_reply()
1161 } else if (!was_auth && ceph_auth_is_authenticated(monc->auth)) { in handle_auth_reply()
1164 monc->client->msgr.inst.name.type = CEPH_ENTITY_TYPE_CLIENT; in handle_auth_reply()
1165 monc->client->msgr.inst.name.num = in handle_auth_reply()
1166 cpu_to_le64(monc->auth->global_id); in handle_auth_reply()
1168 __send_subscribe(monc); in handle_auth_reply()
1169 __resend_generic_request(monc); in handle_auth_reply()
1171 pr_info("mon%d %s session established\n", monc->cur_mon, in handle_auth_reply()
1172 ceph_pr_addr(&monc->con.peer_addr.in_addr)); in handle_auth_reply()
1176 mutex_unlock(&monc->mutex); in handle_auth_reply()
1177 if (monc->client->auth_err < 0) in handle_auth_reply()
1178 wake_up_all(&monc->client->auth_wq); in handle_auth_reply()
1181 static int __validate_auth(struct ceph_mon_client *monc) in __validate_auth() argument
1185 if (monc->pending_auth) in __validate_auth()
1188 ret = ceph_build_auth(monc->auth, monc->m_auth->front.iov_base, in __validate_auth()
1189 monc->m_auth->front_alloc_len); in __validate_auth()
1192 __send_prepared_auth_request(monc, ret); in __validate_auth()
1196 int ceph_monc_validate_auth(struct ceph_mon_client *monc) in ceph_monc_validate_auth() argument
1200 mutex_lock(&monc->mutex); in ceph_monc_validate_auth()
1201 ret = __validate_auth(monc); in ceph_monc_validate_auth()
1202 mutex_unlock(&monc->mutex); in ceph_monc_validate_auth()
1212 struct ceph_mon_client *monc = con->private; in dispatch() local
1215 if (!monc) in dispatch()
1220 handle_auth_reply(monc, msg); in dispatch()
1224 handle_subscribe_ack(monc, msg); in dispatch()
1228 handle_statfs_reply(monc, msg); in dispatch()
1232 handle_get_version_reply(monc, msg); in dispatch()
1236 handle_command_ack(monc, msg); in dispatch()
1240 ceph_monc_handle_map(monc, msg); in dispatch()
1244 ceph_osdc_handle_map(&monc->client->osdc, msg); in dispatch()
1249 if (monc->client->extra_mon_dispatch && in dispatch()
1250 monc->client->extra_mon_dispatch(monc->client, msg) == 0) in dispatch()
1266 struct ceph_mon_client *monc = con->private; in mon_alloc_msg() local
1275 m = ceph_msg_get(monc->m_subscribe_ack); in mon_alloc_msg()
1281 m = ceph_msg_get(monc->m_auth_reply); in mon_alloc_msg()
1324 struct ceph_mon_client *monc = con->private; in mon_fault() local
1326 mutex_lock(&monc->mutex); in mon_fault()
1327 dout("%s mon%d\n", __func__, monc->cur_mon); in mon_fault()
1328 if (monc->cur_mon >= 0) { in mon_fault()
1329 if (!monc->hunting) { in mon_fault()
1331 reopen_session(monc); in mon_fault()
1332 __schedule_delayed(monc); in mon_fault()
1337 mutex_unlock(&monc->mutex); in mon_fault()