Lines Matching refs:num_mon
47 u32 epoch, num_mon; in ceph_monmap_decode() local
60 num_mon = ceph_decode_32(&p); in ceph_monmap_decode()
61 ceph_decode_need(&p, end, num_mon*sizeof(m->mon_inst[0]), bad); in ceph_monmap_decode()
63 if (num_mon > CEPH_MAX_MON) in ceph_monmap_decode()
65 m = kmalloc(struct_size(m, mon_inst, num_mon), GFP_NOFS); in ceph_monmap_decode()
70 m->num_mon = num_mon; in ceph_monmap_decode()
71 ceph_decode_copy(&p, m->mon_inst, num_mon*sizeof(m->mon_inst[0])); in ceph_monmap_decode()
72 for (i = 0; i < num_mon; i++) in ceph_monmap_decode()
76 m->num_mon); in ceph_monmap_decode()
77 for (i = 0; i < m->num_mon; i++) in ceph_monmap_decode()
95 for (i = 0; i < m->num_mon; i++) in ceph_monmap_contains()
138 BUG_ON(monc->monmap->num_mon < 1); in pick_new_mon()
140 if (monc->monmap->num_mon == 1) { in pick_new_mon()
143 int max = monc->monmap->num_mon; in pick_new_mon()
148 if (monc->cur_mon < monc->monmap->num_mon) in pick_new_mon()
162 monc->cur_mon, monc->monmap->num_mon); in pick_new_mon()
999 int num_mon = opt->num_mon; in build_initial_monmap() local
1003 monc->monmap = kzalloc(struct_size(monc->monmap, mon_inst, num_mon), in build_initial_monmap()
1007 for (i = 0; i < num_mon; i++) { in build_initial_monmap()
1014 monc->monmap->num_mon = num_mon; in build_initial_monmap()