Lines Matching refs:monmap
40 * Decode a monmap blob (e.g., during mount).
93 * return true if *addr is included in the monmap.
144 BUG_ON(monc->monmap->num_mon < 1);
146 if (monc->monmap->num_mon == 1) {
149 int max = monc->monmap->num_mon;
154 if (monc->cur_mon < monc->monmap->num_mon)
168 monc->cur_mon, monc->monmap->num_mon);
192 &monc->monmap->mon_inst[monc->cur_mon].addr);
251 [CEPH_SUB_MONMAP] = "monmap",
282 BUG_ON(num < 1); /* monmap sub is always there */
453 * Open a session with a random monitor. Request monmap and osdmap,
472 struct ceph_monmap *monmap;
481 monmap = ceph_monmap_decode(p, end);
482 if (IS_ERR(monmap)) {
483 pr_err("problem decoding monmap, %d\n",
484 (int)PTR_ERR(monmap));
489 if (ceph_check_fsid(client, &monmap->fsid) < 0) {
490 kfree(monmap);
494 kfree(monc->monmap);
495 monc->monmap = monmap;
497 __ceph_monc_got_map(monc, CEPH_SUB_MONMAP, monc->monmap->epoch);
732 h->fsid = monc->monmap->fsid;
828 * @what: one of "mdsmap", "osdmap" or "monmap"
852 * @what: one of "mdsmap", "osdmap" or "monmap"
929 h->fsid = monc->monmap->fsid;
1060 * On startup, we build a temporary monmap populated with the IPs
1070 /* build initial monmap */
1071 monc->monmap = kzalloc(struct_size(monc->monmap, mon_inst, num_mon),
1073 if (!monc->monmap)
1076 monc->monmap->mon_inst[i].addr = mon_addr[i];
1077 monc->monmap->mon_inst[i].addr.nonce = 0;
1078 monc->monmap->mon_inst[i].name.type =
1080 monc->monmap->mon_inst[i].name.num = cpu_to_le64(i);
1082 monc->monmap->num_mon = num_mon;
1093 monc->monmap = NULL;
1159 kfree(monc->monmap);
1194 kfree(monc->monmap);