Lines Matching refs:cnt
82 int cnt, int dir);
83 static void ent_sort(struct alts_ent buf[], int cnt);
84 static void ent_compress(struct alts_ent buf[], int cnt);
91 static int ent_bsearch(struct alts_ent buf[], int cnt, struct alts_ent *key);
184 int cnt;
187 for (cnt = 0; cnt < ap->ap_gbadcnt; cnt++) {
188 badsec = (ap->ap_gbadp)[cnt].bad_start;
214 (ap->ap_gbadp)[cnt].bad_start = (uint32_t)ALTS_ENT_EMPTY;
217 (ap->ap_gbadp)[cnt].bad_start = (uint32_t)ALTS_ENT_EMPTY;
224 &((ap->ap_gbadp)[cnt]));
230 (ap->ap_gbadp)[cnt].bad_start = (uint32_t)ALTS_ENT_EMPTY;
246 int cnt;
257 for (cnt = 0; cnt < 5; cnt++)
258 ap->ap_tblp->alts_pad[cnt] = 0;
260 for (cnt = 0; cnt < ap->ap_gbadcnt; cnt++) {
261 badsec = (ap->ap_gbadp)[cnt].bad_start;
269 (ap->ap_gbadp)[cnt].bad_start = (uint32_t)ALTS_ENT_EMPTY;
384 int cnt;
392 cnt = count_badsec();
393 if (!cnt) {
397 ap->ap_gbadp = (struct alts_ent *)malloc(cnt*ALTS_ENT_SIZE);
398 (void) memset(ap->ap_gbadp,0,cnt*ALTS_ENT_SIZE);
400 for (growbadp = ap->ap_gbadp, cnt=0, blc_p=badsl_chain;
416 growbadp[cnt].bad_start = curbad;
417 growbadp[cnt].bad_end = curbad;
418 cnt++;
422 ap->ap_gbadcnt = cnt;
596 altsmap_alloc(blkaddr_t srt_ind, blkaddr_t end_ind, int cnt, int dir)
610 if (total == cnt)
623 ent_sort(struct alts_ent buf[], int cnt)
629 for (i = 0; i < cnt-1; i++) {
630 temp = buf[cnt-1];
633 for (j = cnt-1; j > i; j--) {
655 ent_compress(struct alts_ent buf[], int cnt)
661 for (i = 0; i < cnt; i++) {
664 for (keyp = i, movp = i+1; movp < cnt; movp++) {
672 if (movp == cnt) break;
724 ent_bsearch(struct alts_ent buf[], int cnt, struct alts_ent *key)
731 if (!cnt)
734 for (i = 1; i <= cnt; i <<= 1)
751 if (ind == cnt) break;
752 if ((ind+interval) <= cnt)
768 int cnt = ap->ap_tblp->alts_ent_used;
773 for (i = 0; i < cnt; i++) {