/src/sbin/fsck_ffs/ |
pass4.c | 67 uint32_t cg; local in function:pass4 73 for (cg = 0; cg < sblock->fs_ncg; cg++) { 77 cdevname(), cg, sblock->fs_ncg, 78 cg * 100 / sblock->fs_ncg); 83 cg, sblock->fs_ncg); 85 inumber = cg * sblock->fs_ipg; 86 for (i = 0; i < inostathead[cg].il_numalloced; i++, inumber++) { 163 int cg, nfrags, res = KEEPON local in function:pass4check [all...] |
pass5.c | 76 struct cg *newcg = (struct cg *)buf; 78 struct cg *cg = cgrp, *ncg; local in function:pass5 120 "cannot reallocate cg space"); 121 cg = cgrp = ncg; 218 memcpy(cg, cgblk.b_un.b_cg, fs->fs_cgsize); 220 ffs_cg_swap(cgblk.b_un.b_cg, cg, sblock); 221 if (!doinglevel1 && !cg_chkmagic(cg, 0)) 222 pfatal("CG %d: PASS5: BAD MAGIC NUMBER\n", c) [all...] |
utilities.c | 409 int i, j, k, cg, baseblk; local in function:allocblk 410 struct cg *cgp = cgrp; 425 cg = dtog(sblock, i + j); 426 getblk(&cgblk, cgtod(sblock, cg), sblock->fs_cgsize); 431 pfatal("CG %d: ALLOCBLK: BAD MAGIC NUMBER\n", 432 cg); 442 sblock->fs_cs(fs, cg).cs_nbfree--; 448 sblock->fs_cs(fs, cg).cs_nffree -= frags;
|
setup.c | 88 uint32_t cg; local in function:setup 163 for (cg = 0; cg < proto.fs_ncg; cg++) { 164 bflag = FFS_FSBTODB(&proto, cgsblock(&proto, cg)); 168 if (cg >= proto.fs_ncg) {
|
inode.c | 716 struct cg *cgp = cgrp; 717 int cg; local in function:allocino 732 cg = ino_to_cg(sblock, ino); 734 if ((ino % sblock->fs_ipg) >= inostathead[cg].il_numalloced) { 737 MAX(2 * inostathead[cg].il_numalloced, 10)); 744 memmove(info, inostathead[cg].il_stat, 745 inostathead[cg].il_numalloced * sizeof(*info)); 746 for (i = inostathead[cg].il_numalloced; i < newalloced; i++) { 749 if (inostathead[cg].il_numalloced) 750 free(inostathead[cg].il_stat) 832 int cg; local in function:freeino [all...] |
/src/sbin/dump/ |
ffs_inode.c | 172 int i, cg, inosused; local in function:fs_mapinodes 173 struct cg *cgp; 180 for (cg = 0; cg < sblock->fs_ncg; cg++) { 181 ino = cg * sblock->fs_ipg; 182 bread(FFS_FSBTODB(sblock, cgtod(sblock, cg)), (char *)cgp, 199 quit("%s: cg %d: bad magic number\n", 200 __func__, cg);
|
/src/sbin/fsck_ext2fs/ |
setup.c | 108 long cg, asked, i; local in function:setup 164 for (cg = 1; cg < proto.e2fs_ncg; cg++) { 166 cg * proto.e2fs.e2fs_bpg + 171 if (cg >= proto.e2fs_ncg) { 275 for (numdirs = 0, cg = 0; cg < sblock.e2fs_ncg; cg++) { 276 numdirs += fs2h16(sblock.e2fs_gd[cg].ext2bgd_ndirs) [all...] |
/src/sbin/badsect/ |
badsect.c | 79 struct cg cg; member in union:__anone1f2afb4020a 82 #define acg ucg.cg 206 int cg; local in function:chkuse 217 cg = (int)dtog(fs, fsbn); 218 if (fsbn < cgdmin(fs, cg)) { 219 if (cg == 0 || fsbe > cgsblock(fs, cg)) { 225 if (fsbe > cgbase(fs, cg + 1)) { 232 rdfs(FFS_FSBTODB(fs, cgtod(fs, cg)), (int)sblock.fs_cgsize, &acg) [all...] |
/src/usr.sbin/makefs/ffs/ |
ffs_alloc.c | 75 static int32_t ffs_mapsearch(struct fs *, struct cg *, daddr_t, int); 106 int cg; local in function:ffs_alloc 118 cg = ino_to_cg(fs, ip->i_number); 120 cg = dtog(fs, bpref); 121 bno = ffs_hashalloc(ip, cg, bpref, size, ffs_alloccg); 162 uint32_t cg, startcg; local in function:ffs_blkpref_ufs1 168 cg = ino_to_cg(fs, ip->i_number); 169 return (fs->fs_fpg * cg + fs->fs_frag); 183 for (cg = startcg; cg < fs->fs_ncg; cg++ 201 uint32_t cg, startcg; local in function:ffs_blkpref_ufs2 438 int i, error, cg, blk, frags, bbase; local in function:ffs_blkfree [all...] |
mkfs.c | 97 struct cg cg; member in union:__anona7f2e746020a 100 #define acg cgun.cg 763 ffs_cg_swap(&acg, (struct cg*)&iobuf[start], &sblock);
|
/src/games/backgammon/backgammon/ |
move.c | 83 static int cg[5]; /* candidate finish position */ variable in typeref:typename:int[5] 155 cp[i] = cg[i] = 0; 168 wrint(mm->g[i] = cg[i]); 464 if ((cp[0] == 0 && cg[0] == 0) || movegood()) { 471 cg[i] = mm->g[i];
|
/src/sys/ufs/ffs/ |
ffs_wapbl.c | 775 struct cg *cgp; 781 int bpcg, cg, error, fixedsize, indir_blks, n, s; local in function:wapbl_find_log_start 841 /* Look at number of blocks per CG. If it's too small, bail early. */ 864 for (cg = fs->fs_ncg / 2, s = 0, n = 1; 865 best_blks < desired_blks && cg >= 0 && cg < fs->fs_ncg; 866 s++, n = -n, cg += n * s) { 867 DPRINTF("check cg %d of %d\n", cg, fs->fs_ncg); 868 error = bread(devvp, FFS_FSBTODB(fs, cgtod(fs, cg)), [all...] |
ffs_vfsops.c | 210 int cg = ino_to_cg(fs, ino); local in function:ffs_checkrange 213 int error = bread(ump->um_devvp, FFS_FSBTODB(fs, cgtod(fs, cg)), 216 DPRINTF("error %d reading cg %d ino %" PRIu64 "\n", 217 error, cg, ino); 223 struct cg *cgp = (struct cg *)bp->b_data; 226 DPRINTF("bad cylinder group magic cg %d ino %" PRIu64 "\n", 227 cg, ino); 234 if (cg * fs->fs_ipg + initediblk < ino) { 235 DPRINTF("cg=%d fs->fs_ipg=%d initediblk=%d ino=%" PRIu64 "\n" [all...] |
ffs_alloc.c | 118 static int32_t ffs_mapsearch(struct fs *, struct cg *, 182 u_int cg; local in function:ffs_alloc 255 cg = ino_to_cg(fs, ip->i_number); 257 cg = dtog(fs, bpref); 258 bno = ffs_hashalloc(ip, cg, bpref, size, 0, flags, ffs_alloccg); 314 u_int cg, request; local in function:ffs_realloccg 404 cg = dtog(fs, bprev); 406 if ((bno = ffs_fragextend(ip, cg, bprev, osize, nsize)) != 0) { 490 bno = ffs_hashalloc(ip, cg, bpref, request, nsize, 0, ffs_alloccg); 575 u_int cg; local in function:ffs_valloc 642 u_int cg, prefcg; local in function:ffs_dirpref 775 u_int cg; local in function:ffs_blkpref_ufs1 839 u_int cg; local in function:ffs_blkpref_ufs2 1187 int cg; local in function:ffs_alloccgblk 1462 u_int cg; local in function:ffs_blkalloc_ump 1567 u_int cg; local in function:ffs_blkfree_cg 1839 int error, cg; local in function:ffs_blkfree_snap 1878 u_int cg; local in function:ffs_blkfree_common 2002 u_int cg; local in function:ffs_freefile 2039 int error, cg; local in function:ffs_freefile_snap 2075 u_int cg; local in function:ffs_freefile_common 2125 u_int cg; local in function:ffs_checkfreefile [all...] |
fs.h | 59 * The beginning of cylinder group cg in fs, is given by 60 * the ``cgbase(fs, cg)'' macro. 137 * thus changes to (struct cg) must keep its size within MINBSIZE. 262 int32_t fs_dblkno; /* offset of first data after cg */ 325 int32_t fs_cgrotor; /* last cg searched (UNUSED) */ 328 struct csum *fs_csp; /* cg summary info buffer for fs_cs */ 356 int32_t fs_save_cgsize; /* save real cg size to use fs_bsize */ 460 #define ACTIVECG_SET(fs, cg) \ 463 setbit((fs)->fs_active, (cg)); \ 465 #define ACTIVECG_CLR(fs, cg) \ 506 struct cg { struct [all...] |
/src/sys/ufs/ext2fs/ |
ext2fs_alloc.c | 122 int cg; local in function:ext2fs_alloc 139 cg = ino_to_cg(fs, ip->i_number); 141 cg = dtog(fs, bpref); 142 bno = (daddr_t)ext2fs_hashalloc(ip, cg, bpref, fs->e2fs_bsize, 177 int cg; local in function:ext2fs_valloc 185 cg = ext2fs_dirpref(fs); 187 cg = ino_to_cg(fs, pip->i_number); 188 ipref = cg * fs->e2fs.e2fs_ipg + 1; 189 ino = (ino_t)ext2fs_hashalloc(pip, cg, (long)ipref, mode, ext2fs_nodealloccg); 212 int cg, maxspace, mincg, avgifree local in function:ext2fs_dirpref 251 int cg, i; local in function:ext2fs_blkpref 521 int error, cg; local in function:ext2fs_blkfree 569 int error, cg; local in function:ext2fs_vfree 861 int cg, i, error; local in function:ext2fs_cg_verify_and_initialize [all...] |
/src/usr.sbin/dumpfs/ |
dumpfs.c | 79 struct cg cg; member in union:__anon19dc494e010a 82 #define acg cgun.cg 616 printf("cg %d:\n", c); 621 warnx("%s: error reading cg", name);
|
/src/usr.sbin/makefs/ |
ffs.c | 168 1, INT_MAX, "max blocks per file in a cg" }, 1065 struct cg *cgp; 1067 uint32_t cg, cgino, i; local in function:ffs_write_inode 1079 cg = ino_to_cg(fs, ino); 1082 printf("ffs_write_inode: din %p ino %u cg %d cgino %d\n", 1083 dp, ino, cg, cgino); 1085 ffs_rdfs(FFS_FSBTODB(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, &sbbuf, 1087 cgp = (struct cg *)sbbuf; 1090 "ffs_write_inode: cg %d: bad magic number", cg); [all...] |
/src/usr.sbin/quotacheck/ |
quotacheck.c | 323 uint32_t cg; local in function:chkquota 325 struct cg *cgp; 410 warn("%s: can't allocate %d bytes of cg space", fsname, 419 for (cg = 0; cg < sblock.fs_ncg; cg++) { 420 ino = cg * sblock.fs_ipg; 424 bread(FFS_FSBTODB(&sblock, cgtod(&sblock, cg)), (char *)cgp, 436 fsname, cg, sblock.fs_ncg, 437 cg * 100 / sblock.fs_ncg) [all...] |
/src/sbin/newfs/ |
mkfs.c | 151 struct cg cg; member in union:__anon7a06db1c020a 154 #define acg cgun->cg 427 * Round up so we don't have more fragments in the last CG than 459 * of the other groups then the last CG will be overfull. 460 * So we just kill the last CG. 478 * Write this fragment by fragment, but doing the first CG last 741 * Write out the super-block and zeros until the first cg info 958 ffs_cg_swap(&acg, (struct cg*)&iobuf[start], &sblock); 1308 printf("cg 0: bad magic number\n") [all...] |
/src/usr.sbin/npf/npfctl/ |
npf_build.c | 813 npf_rule_layer_compat(nl_rule_t *cg, uint32_t layer) 815 uint32_t attr = attr = npf_rule_getattr(cg); 837 nl_rule_t *rl, *cg; local in function:npfctl_build_rule 857 cg = current_group[rule_nesting_level]; 858 attr |= npf_rule_layer_compat(cg, fopts->layer); 887 cg = current_group[rule_nesting_level]; 892 assert(cg != NULL); 894 npf_rule_insert(npf_conf, cg, rl);
|
/src/sbin/resize_ffs/ |
resize_ffs.c | 77 /* size of a cg, in bytes, rounded up to a frag boundary */ 108 /* a cg's worth of brand new squeaky-clean inodes */ 113 static struct cg **cgs; 118 /* per-cg flags, indexed by cg number */ 325 * them into and initializes the per-cg flags. 330 uint32_t cg; local in function:loadcgs 334 cgs = nfmalloc(oldsb->fs_ncg * sizeof(*cgs), "cg pointers"); 336 cgflags = nfmalloc(oldsb->fs_ncg, "cg flags"); 337 csums = nfmalloc(oldsb->fs_cssize, "cg summary") 465 struct cg *cg; \/* The in-core cg, of course *\/ local in function:initcg 543 cg_clustersum(cg, 0)[(n > newsb->fs_contigsumsize) ? local in function:initcg 572 old_cg_blktot(cg, 0)[old_cbtocylno(newsb, di)]++; local in function:initcg 596 cg_clustersum(cg, 0)[(n > newsb->fs_contigsumsize) ? local in function:initcg 601 old_cg_blktot(cg, 0)[old_cbtocylno(newsb, local in function:initcg 1051 struct cg *cg; local in function:grow 1810 struct cg *cg; local in function:shrink 1867 struct cg *cg; local in function:rescan_blkmaps 1930 old_cg_blktot(cg, 0)[ local in function:rescan_blkmaps 1947 cg_clustersum(cg, 0)[(blkrun local in function:rescan_blkmaps 1966 cg_clustersum(cg, 0)[(blkrun > newsb->fs_contigsumsize) ? local in function:rescan_blkmaps 1985 struct cg *cg; local in function:rescan_inomaps [all...] |