Home
last modified time | relevance | path

Searched refs:cgp (Results 1 – 22 of 22) sorted by relevance

/trueos/lib/libufs/
HDcgroup.c53 struct cg *cgp; in cgballoc() local
58 cgp = &disk->d_cg; in cgballoc()
59 blksfree = cg_blksfree(cgp); in cgballoc()
65 fs->fs_cs(fs, cgp->cg_cgx).cs_nbfree--; in cgballoc()
67 ffs_clusteracct(fs, cgp, bno, -1); in cgballoc()
68 cgp->cg_cs.cs_nbfree--; in cgballoc()
71 return (cgbase(fs, cgp->cg_cgx) + blkstofrags(fs, bno)); in cgballoc()
79 struct cg *cgp; in cgbfree() local
87 cgp = &disk->d_cg; in cgbfree()
89 blksfree = cg_blksfree(cgp); in cgbfree()
[all …]
/trueos/usr.sbin/makefs/ffs/
HDffs_alloc.c294 struct cg *cgp; in ffs_alloccg() local
309 cgp = (struct cg *)bp->b_data; in ffs_alloccg()
310 if (!cg_chkmagic_swap(cgp, needswap) || in ffs_alloccg()
311 (cgp->cg_cs.cs_nbfree == 0 && size == fs->fs_bsize)) { in ffs_alloccg()
327 if (cgp->cg_frsum[allocsiz] != 0) in ffs_alloccg()
334 if (cgp->cg_cs.cs_nbfree == 0) { in ffs_alloccg()
341 setbit(cg_blksfree_swap(cgp, needswap), bpref + i); in ffs_alloccg()
343 ufs_add32(cgp->cg_cs.cs_nffree, i, needswap); in ffs_alloccg()
347 ufs_add32(cgp->cg_frsum[i], 1, needswap); in ffs_alloccg()
351 bno = ffs_mapsearch(fs, cgp, bpref, allocsiz); in ffs_alloccg()
[all …]
/trueos/sbin/fsck_ffs/
HDfsutil.c225 struct cg *cgp; in cgget() local
235 cgp = NULL; in cgget()
237 cgp = malloc((unsigned int)sblock.fs_cgsize); in cgget()
238 if (cgp == NULL) { in cgget()
242 cgbp->b_un.b_cg = cgp; in cgget()
691 struct cg *cgp = cgbp->b_un.b_cg; in check_cgmagic() local
696 if (cg_chkmagic(cgp) && in check_cgmagic()
698 cgp->cg_old_niblk == sblock.fs_ipg && in check_cgmagic()
699 cgp->cg_ndblk <= sblock.fs_fpg && in check_cgmagic()
700 cgp->cg_old_ncyl <= sblock.fs_old_cpg) || in check_cgmagic()
[all …]
HDgjournal.c262 struct cg *cgp; in blkfree() local
270 cgp = &cgc->cgc_cg; in blkfree()
272 blksfree = cg_blksfree(cgp); in blkfree()
278 ffs_clusteracct(fs, cgp, fragno, 1); in blkfree()
279 cgp->cg_cs.cs_nbfree++; in blkfree()
288 ffs_fragacct(fs, blk, cgp->cg_frsum, -1); in blkfree()
298 cgp->cg_cs.cs_nffree += i; in blkfree()
305 ffs_fragacct(fs, blk, cgp->cg_frsum, 1); in blkfree()
311 cgp->cg_cs.cs_nffree -= fs->fs_frag; in blkfree()
314 ffs_clusteracct(fs, cgp, fragno, 1); in blkfree()
[all …]
HDpass1.c65 struct cg *cgp; in pass1() local
100 cgp = cgbp->b_un.b_cg; in pass1()
105 inosused = cgp->cg_initediblk; in pass1()
135 cp = &cg_inosused(cgp)[(inosused - 1) / CHAR_BIT]; in pass1()
177 i > cgp->cg_initediblk) in pass1()
189 cgp->cg_initediblk > 2 * INOPB(&sblock) && in pass1()
190 mininos < cgp->cg_initediblk) { in pass1()
191 i = cgp->cg_initediblk; in pass1()
193 cgp->cg_initediblk = 2 * INOPB(&sblock); in pass1()
195 cgp->cg_initediblk = mininos; in pass1()
[all …]
HDsuj.c609 struct cg *cgp; in ino_free() local
615 cgp = sc->sc_cgp; in ino_free()
616 inosused = cg_inosused(cgp); in ino_free()
625 if (ino < cgp->cg_irotor) in ino_free()
626 cgp->cg_irotor = ino; in ino_free()
627 cgp->cg_cs.cs_nifree++; in ino_free()
630 cgp->cg_cs.cs_ndir--; in ino_free()
646 struct cg *cgp; in blk_free() local
655 cgp = sc->sc_cgp; in blk_free()
657 blksfree = cg_blksfree(cgp); in blk_free()
[all …]
HDinode.c661 struct cg *cgp; in allocino() local
675 cgp = cgbp->b_un.b_cg; in allocino()
678 setbit(cg_inosused(cgp), ino % sblock.fs_ipg); in allocino()
679 cgp->cg_cs.cs_nifree--; in allocino()
683 cgp->cg_cs.cs_ndir++; in allocino()
/trueos/usr.sbin/makefs/
HDmakefs.h269 #define cg_chkmagic_swap(cgp, ns) \ argument
270 (ufs_rw32((cgp)->cg_magic, (ns)) == CG_MAGIC)
271 #define cg_inosused_swap(cgp, ns) \ argument
272 ((u_int8_t *)((u_int8_t *)(cgp) + ufs_rw32((cgp)->cg_iusedoff, (ns))))
273 #define cg_blksfree_swap(cgp, ns) \ argument
274 ((u_int8_t *)((u_int8_t *)(cgp) + ufs_rw32((cgp)->cg_freeoff, (ns))))
275 #define cg_clustersfree_swap(cgp, ns) \ argument
276 ((u_int8_t *)((u_int8_t *)(cgp) + ufs_rw32((cgp)->cg_clusteroff, (ns))))
277 #define cg_clustersum_swap(cgp, ns) \ argument
278 ((int32_t *)((uintptr_t)(cgp) + ufs_rw32((cgp)->cg_clustersumoff, ns)))
HDffs.c1056 struct cg *cgp; in ffs_write_inode() local
1078 cgp = (struct cg *)sbbuf; in ffs_write_inode()
1079 if (!cg_chkmagic_swap(cgp, fsopts->needswap)) in ffs_write_inode()
1082 assert (isclr(cg_inosused_swap(cgp, fsopts->needswap), cgino)); in ffs_write_inode()
1098 setbit(cg_inosused_swap(cgp, fsopts->needswap), cgino); in ffs_write_inode()
1099 ufs_add32(cgp->cg_cs.cs_nifree, -1, fsopts->needswap); in ffs_write_inode()
1103 ufs_add32(cgp->cg_cs.cs_ndir, 1, fsopts->needswap); in ffs_write_inode()
1111 initediblk = ufs_rw32(cgp->cg_initediblk, fsopts->needswap); in ffs_write_inode()
1113 initediblk < ufs_rw32(cgp->cg_niblk, fsopts->needswap)) { in ffs_write_inode()
1125 cgp->cg_initediblk = ufs_rw32(initediblk, fsopts->needswap); in ffs_write_inode()
/trueos/sys/ufs/ffs/
HDffs_alloc.c1570 struct cg *cgp; local
1594 cgp = (struct cg *)bp->b_data;
1595 if (!cg_chkmagic(cgp))
1598 cgp->cg_old_time = cgp->cg_time = time_second;
1600 blksfree = cg_blksfree(cgp);
1613 cgp->cg_frsum[i - numfrags(fs, osize)]--;
1615 cgp->cg_frsum[i - frags]++;
1618 cgp->cg_cs.cs_nffree--;
1655 struct cg *cgp; local
1672 cgp = (struct cg *)bp->b_data;
[all …]
HDfs.h507 #define cg_chkmagic(cgp) ((cgp)->cg_magic == CG_MAGIC) argument
508 #define cg_inosused(cgp) \ argument
509 ((u_int8_t *)((u_int8_t *)(cgp) + (cgp)->cg_iusedoff))
510 #define cg_blksfree(cgp) \ argument
511 ((u_int8_t *)((u_int8_t *)(cgp) + (cgp)->cg_freeoff))
512 #define cg_clustersfree(cgp) \ argument
513 ((u_int8_t *)((u_int8_t *)(cgp) + (cgp)->cg_clusteroff))
514 #define cg_clustersum(cgp) \ argument
515 ((int32_t *)((uintptr_t)(cgp) + (cgp)->cg_clustersumoff))
HDffs_subr.c330 ffs_clusteracct(fs, cgp, blkno, cnt) in ffs_clusteracct() argument
332 struct cg *cgp;
343 freemapp = cg_clustersfree(cgp);
344 sump = cg_clustersum(cgp);
357 if (end >= cgp->cg_nclusterblks)
358 end = cgp->cg_nclusterblks;
413 fs->fs_maxcluster[cgp->cg_cgx] = i;
HDffs_softdep.c2454 struct cg *cgp; local
2537 cgp = (struct cg *)bp->b_data;
2538 cstotal.cs_nffree += cgp->cg_cs.cs_nffree;
2539 cstotal.cs_nbfree += cgp->cg_cs.cs_nbfree;
2540 cstotal.cs_nifree += cgp->cg_cs.cs_nifree;
2541 cstotal.cs_ndir += cgp->cg_cs.cs_ndir;
2542 fs->fs_cs(fs, cyl) = cgp->cg_cs;
5093 struct cg *cgp; local
5098 cgp = (struct cg *)bp->b_data;
5099 blksfree = cg_blksfree(cgp);
[all …]
HDffs_snapshot.c884 struct cg *cgp; local
897 cgp = (struct cg *)bp->b_data;
898 if (!cg_chkmagic(cgp)) {
910 fs->fs_cs(fs, cg) = cgp->cg_cs;
916 cgp = (struct cg *)nbp->b_data;
928 if (ffs_isblock(fs, cg_blksfree(cgp), loc))
956 if (ffs_isblock(fs, cg_blksfree(cgp), loc))
967 if (ffs_isblock(fs, cg_blksfree(cgp), loc))
/trueos/sys/ufs/ufs/
HDufs_gjournal.c55 struct cg *cgp; in ufs_gjournal_modref() local
89 cgp = (struct cg *)bp->b_data; in ufs_gjournal_modref()
90 if (!cg_chkmagic(cgp)) { in ufs_gjournal_modref()
95 cgp->cg_unrefs += count; in ufs_gjournal_modref()
/trueos/usr.sbin/quot/
HDquot.c112 static struct cg *cgp; in get_inode() local
122 free(cgp); in get_inode()
123 cgp = 0; in get_inode()
131 (!cgp || cg != ino_to_cg(super, ino))) { in get_inode()
133 if (!cgp && !(cgp = malloc(super->fs_cgsize))) in get_inode()
137 if (read(fd, cgp, super->fs_cgsize) != super->fs_cgsize) in get_inode()
139 if (!cg_chkmagic(cgp)) in get_inode()
156 if (isclr(cg_inosused(cgp), ino % super->fs_ipg)) in get_inode()
/trueos/sbin/tunefs/
HDtunefs.c584 struct cg *cgp; in journal_balloc() local
588 cgp = &disk.d_cg; in journal_balloc()
606 if (cgp->cg_cs.cs_nbfree > 256 * 1024) in journal_balloc()
608 if (contig == 0 && cgp->cg_cs.cs_nbfree) in journal_balloc()
943 struct cg *cgp; in journal_alloc() local
951 cgp = &disk.d_cg; in journal_alloc()
990 if (cgp->cg_cs.cs_nifree == 0) in journal_alloc()
996 (uintmax_t)ino, cgp->cg_cgx, size); in journal_alloc()
/trueos/contrib/llvm/utils/TableGen/
HDDAGISelEmitter.cpp77 PatternSortingPredicate(CodeGenDAGPatterns &cgp) : CGP(cgp) {} in PatternSortingPredicate()
HDDAGISelMatcherGen.cpp98 MatcherGen(const PatternToMatch &pattern, const CodeGenDAGPatterns &cgp);
145 const CodeGenDAGPatterns &cgp) in MatcherGen() argument
146 : Pattern(pattern), CGP(cgp), NextRecordedOperandNo(0), in MatcherGen()
HDDAGISelMatcherEmitter.cpp51 MatcherTableEmitter(const CodeGenDAGPatterns &cgp) in MatcherTableEmitter() argument
52 : CGP(cgp) {} in MatcherTableEmitter()
/trueos/sbin/dump/
HDtraverse.c156 struct cg *cgp; in mapfiles() local
160 if ((cgp = malloc(sblock->fs_cgsize)) == NULL) in mapfiles()
164 bread(fsbtodb(sblock, cgtod(sblock, cg)), (char *)cgp, in mapfiles()
167 inosused = cgp->cg_initediblk; in mapfiles()
178 if (!cg_chkmagic(cgp)) in mapfiles()
180 cp = &cg_inosused(cgp)[(inosused - 1) / CHAR_BIT]; in mapfiles()
/trueos/sbin/fsdb/
HDfsdb.c445 struct cg *cgp; in CMDFUNCSTART() local
478 cgp = cgbp->b_un.b_cg; in CMDFUNCSTART()
484 inosused = cgp->cg_initediblk; in CMDFUNCSTART()