Lines Matching refs:monmap
72 struct ceph_monmap *monmap = NULL; in ceph_monmap_decode() local
120 monmap = kmalloc(struct_size(monmap, mon_inst, num_mon), GFP_NOIO); in ceph_monmap_decode()
121 if (!monmap) { in ceph_monmap_decode()
125 monmap->fsid = fsid; in ceph_monmap_decode()
126 monmap->epoch = epoch; in ceph_monmap_decode()
127 monmap->num_mon = num_mon; in ceph_monmap_decode()
131 struct ceph_entity_inst *inst = &monmap->mon_inst[i]; in ceph_monmap_decode()
148 return monmap; in ceph_monmap_decode()
153 kfree(monmap); in ceph_monmap_decode()
209 BUG_ON(monc->monmap->num_mon < 1); in pick_new_mon()
211 if (monc->monmap->num_mon == 1) { in pick_new_mon()
214 int max = monc->monmap->num_mon; in pick_new_mon()
219 if (monc->cur_mon < monc->monmap->num_mon) in pick_new_mon()
233 monc->cur_mon, monc->monmap->num_mon); in pick_new_mon()
257 &monc->monmap->mon_inst[monc->cur_mon].addr); in __open_session()
543 struct ceph_monmap *monmap; in ceph_monc_handle_map() local
552 monmap = ceph_monmap_decode(&p, end, ceph_msgr2(client)); in ceph_monc_handle_map()
553 if (IS_ERR(monmap)) { in ceph_monc_handle_map()
555 (int)PTR_ERR(monmap)); in ceph_monc_handle_map()
560 if (ceph_check_fsid(client, &monmap->fsid) < 0) { in ceph_monc_handle_map()
561 kfree(monmap); in ceph_monc_handle_map()
565 kfree(monc->monmap); in ceph_monc_handle_map()
566 monc->monmap = monmap; in ceph_monc_handle_map()
568 __ceph_monc_got_map(monc, CEPH_SUB_MONMAP, monc->monmap->epoch); in ceph_monc_handle_map()
803 h->fsid = monc->monmap->fsid; in ceph_monc_do_statfs()
1000 h->fsid = monc->monmap->fsid; in do_mon_command_vargs()
1143 monc->monmap = kzalloc(struct_size(monc->monmap, mon_inst, num_mon), in build_initial_monmap()
1145 if (!monc->monmap) in build_initial_monmap()
1149 struct ceph_entity_inst *inst = &monc->monmap->mon_inst[i]; in build_initial_monmap()
1158 monc->monmap->num_mon = num_mon; in build_initial_monmap()
1234 kfree(monc->monmap); in ceph_monc_init()
1269 kfree(monc->monmap); in ceph_monc_stop()