Lines Matching refs:monmap
66 * Decode a monmap blob (e.g., during mount).
72 struct ceph_monmap *monmap = NULL;
85 ret = ceph_start_decoding(p, end, 6, "monmap", &struct_v, &struct_len);
120 monmap = kmalloc(struct_size(monmap, mon_inst, num_mon), GFP_NOIO);
121 if (!monmap) {
125 monmap->fsid = fsid;
126 monmap->epoch = epoch;
127 monmap->num_mon = num_mon;
131 struct ceph_entity_inst *inst = &monmap->mon_inst[i];
148 return monmap;
153 kfree(monmap);
158 * return true if *addr is included in the monmap.
209 BUG_ON(monc->monmap->num_mon < 1);
211 if (monc->monmap->num_mon == 1) {
214 int max = monc->monmap->num_mon;
219 if (monc->cur_mon < monc->monmap->num_mon)
233 monc->cur_mon, monc->monmap->num_mon);
257 &monc->monmap->mon_inst[monc->cur_mon].addr);
322 [CEPH_SUB_MONMAP] = "monmap",
353 BUG_ON(num < 1); /* monmap sub is always there */
524 * Open a session with a random monitor. Request monmap and osdmap,
543 struct ceph_monmap *monmap;
552 monmap = ceph_monmap_decode(&p, end, ceph_msgr2(client));
553 if (IS_ERR(monmap)) {
554 pr_err("problem decoding monmap, %d\n",
555 (int)PTR_ERR(monmap));
560 if (ceph_check_fsid(client, &monmap->fsid) < 0) {
561 kfree(monmap);
565 kfree(monc->monmap);
566 monc->monmap = monmap;
568 __ceph_monc_got_map(monc, CEPH_SUB_MONMAP, monc->monmap->epoch);
803 h->fsid = monc->monmap->fsid;
899 * @what: one of "mdsmap", "osdmap" or "monmap"
923 * @what: one of "mdsmap", "osdmap" or "monmap"
1000 h->fsid = monc->monmap->fsid;
1123 * On startup, we build a temporary monmap populated with the IPs
1134 /* build initial monmap */
1135 monc->monmap = kzalloc(struct_size(monc->monmap, mon_inst, num_mon),
1137 if (!monc->monmap)
1141 struct ceph_entity_inst *inst = &monc->monmap->mon_inst[i];
1150 monc->monmap->num_mon = num_mon;
1226 kfree(monc->monmap);
1259 kfree(monc->monmap);