Lines Matching defs:bic
443 parse_pseg(struct clfs *fs, daddr_t daddr, BLOCK_INFO **bipp, int *bic)
460 obic = *bic;
539 ++*bic;
540 nbip = (BLOCK_INFO *)realloc(bip, *bic *
545 --*bic;
549 bip[*bic - 1].bi_inode = lfs_dino_getinumber(fs, dip);
550 bip[*bic - 1].bi_lbn = LFS_UNUSED_LBN;
551 bip[*bic - 1].bi_daddr = daddr;
552 bip[*bic - 1].bi_segcreate = lfs_ss_getcreate(fs, ssp);
553 bip[*bic - 1].bi_version = lfs_dino_getgen(fs, dip);
554 bip[*bic - 1].bi_bp = dip;
555 bip[*bic - 1].bi_size = DINOSIZE(fs);
623 nbip = (BLOCK_INFO *)realloc(bip, (*bic + lfs_fi_getnblocks(fs, fip)) *
633 bip[*bic + i].bi_inode = lfs_fi_getino(fs, fip);
634 bip[*bic + i].bi_lbn = lfs_fi_getblock(fs, fip, i);
635 bip[*bic + i].bi_daddr = daddr;
636 bip[*bic + i].bi_segcreate = lfs_ss_getcreate(fs, ssp);
637 bip[*bic + i].bi_version = lfs_fi_getversion(fs, fip);
638 bip[*bic + i].bi_size = (i == lfs_fi_getnblocks(fs, fip) - 1) ?
642 bip[*bic + i].bi_bp = cp;
643 daddr += lfs_btofsb(fs, bip[*bic + i].bi_size);
646 check_test_pattern(bip + *bic + i); /* XXXDEBUG */
649 *bic += lfs_fi_getnblocks(fs, fip);
659 *bic = obic;
701 load_segment(struct clfs *fs, int sn, BLOCK_INFO **bipp, int *bic)
731 daddr = parse_pseg(fs, daddr, bipp, bic);
863 toss_old_blocks(struct clfs *fs, BLOCK_INFO **bipp, blkcnt_t *bic, int *sizep)
873 if (bic == 0 || bip == NULL)
880 for (i = 0; i < *bic; i++)
884 * XXX: blkcnt_t is 64 bits, so *bic might overflow size_t
888 * while *bic here might cause a 64->32 truncation, it's safe.
891 heapsort(bip, *bic, sizeof(BLOCK_INFO), bi_comparator);
895 lim.blkcnt = *bic;
903 heapsort(bip, *bic, sizeof(BLOCK_INFO), bi_comparator);
908 for (i = 0; i < *bic; i++) {
914 *bic = i; /* XXX should we shrink bip? */
927 int i, r, bic;
939 bic = 0;
941 if (load_segment(fs, sn, &bip, &bic) <= 0)
943 widebic = bic;
945 bic = widebic;
948 for (i = nb = 0; i < bic; i++)
959 lim.blkcnt = bic;
986 check_or_add(ino_t ino, daddr_t lbn, BLOCK_INFO *bip, int bic, BLOCK_INFO **ebipp, int *ebicp)
992 for (k = 0; k < bic; k++) {
1029 check_hidden_cost(struct clfs *fs, BLOCK_INFO *bip, int bic, off_t *ifc)
1041 for (i = 0; i < bic; i++) {
1051 bip, bic, &ebip, &ebic);
1063 bip + start, bic - start, &ebip, &ebic);
1077 int i, j, ngood, sn, bic, r, npos;
1129 bic = 0;
1157 if ((r = load_segment(fs, sn, &bip, &bic)) > 0) {
1159 widebic = bic;
1161 bic = widebic;
1182 if ((r = load_segment(fs, sn, &bip, &bic)) > 0)
1189 widebic = bic;
1191 bic = widebic;
1195 if (bic == 0) {
1203 for (i = nb = 0; i < bic; i++)
1217 extra = lfs_sb_getbsize(fs) * (off_t)check_hidden_cost(fs, bip, bic, &if_extra);
1227 for (mc = 0, mbip = bip; mc < bic; mc += inc, mbip += inc) {
1229 lim.blkcnt = (bic - mc > inc ? inc : bic - mc);
1618 int bic = 0;
1629 load_segment(fsp[0], i, &bip, &bic);
1630 bic = 0;