Lines Matching refs:newcg
65 struct cg *newcg = &u.cg; in pass5() local
68 newcg->cg_niblk = fs->fs_ipg; in pass5()
78 basesize = &newcg->cg_space[0] - (uchar_t *)newcg; in pass5()
92 newcg->cg_btotoff = basesize; in pass5()
93 newcg->cg_boff = newcg->cg_btotoff + fs->fs_cpg * sizeof (daddr32_t); in pass5()
94 newcg->cg_iusedoff = newcg->cg_boff + in pass5()
96 (void) memset(&newcg->cg_space[0], 0, newcg->cg_iusedoff - basesize); in pass5()
99 newcg->cg_freeoff = newcg->cg_iusedoff + inomapsize; in pass5()
101 newcg->cg_nextfreeoff = newcg->cg_freeoff + blkmapsize; in pass5()
102 newcg->cg_magic = CG_MAGIC; in pass5()
104 sumsize = newcg->cg_iusedoff - newcg->cg_btotoff; in pass5()
105 mapsize = newcg->cg_nextfreeoff - newcg->cg_iusedoff; in pass5()
158 newcg->cg_time = cg->cg_time; in pass5()
160 newcg->cg_time = now; in pass5()
161 newcg->cg_cgx = c; in pass5()
166 newcg->cg_ndblk = dmax - dbase; in pass5()
168 newcg->cg_ncyl = fs->fs_ncyl - (fs->fs_cpg * c); in pass5()
170 newcg->cg_ncyl = fs->fs_cpg; in pass5()
171 newcg->cg_niblk = sblock.fs_ipg; in pass5()
172 newcg->cg_cs.cs_ndir = 0; in pass5()
173 newcg->cg_cs.cs_nffree = 0; in pass5()
174 newcg->cg_cs.cs_nbfree = 0; in pass5()
175 newcg->cg_cs.cs_nifree = fs->fs_ipg; in pass5()
176 if ((cg->cg_rotor >= 0) && (cg->cg_rotor < newcg->cg_ndblk)) in pass5()
177 newcg->cg_rotor = cg->cg_rotor; in pass5()
179 newcg->cg_rotor = 0; in pass5()
180 if ((cg->cg_frotor >= 0) && (cg->cg_frotor < newcg->cg_ndblk)) in pass5()
181 newcg->cg_frotor = cg->cg_frotor; in pass5()
183 newcg->cg_frotor = 0; in pass5()
184 if ((cg->cg_irotor >= 0) && (cg->cg_irotor < newcg->cg_niblk)) in pass5()
185 newcg->cg_irotor = cg->cg_irotor; in pass5()
187 newcg->cg_irotor = 0; in pass5()
188 (void) memset((void *)&newcg->cg_frsum[0], 0, in pass5()
189 sizeof (newcg->cg_frsum)); in pass5()
190 (void) memset((void *)cg_inosused(newcg), 0, (size_t)mapsize); in pass5()
192 (void) memset((void *)&cg_blktot(newcg)[0], 0, in pass5()
205 newcg->cg_cs.cs_ndir++; in pass5()
213 newcg->cg_cs.cs_nifree--; in pass5()
214 setbit(cg_inosused(newcg), i); in pass5()
226 setbit(cg_inosused(newcg), i); in pass5()
227 newcg->cg_cs.cs_nifree--; in pass5()
242 setbit(cg_blksfree(newcg), i + j); in pass5()
246 newcg->cg_cs.cs_nbfree++; in pass5()
249 cg_blktot(newcg)[j]++; in pass5() local
251 cg_blks(fs, newcg, j)[cbtorpos(fs, i)]++; in pass5()
253 newcg->cg_cs.cs_nffree += frags; in pass5()
254 blk = blkmap(fs, cg_blksfree(newcg), i); in pass5()
255 fragacct(fs, blk, newcg->cg_frsum, 1); in pass5()
258 cstotal.cs_nffree += newcg->cg_cs.cs_nffree; in pass5()
259 cstotal.cs_nbfree += newcg->cg_cs.cs_nbfree; in pass5()
260 cstotal.cs_nifree += newcg->cg_cs.cs_nifree; in pass5()
261 cstotal.cs_ndir += newcg->cg_cs.cs_ndir; in pass5()
277 bad_csum_sb = (memcmp((void *)cs, (void *)&newcg->cg_cs, in pass5()
280 bad_csum_cg = (memcmp((void *)&cg->cg_cs, (void *)&newcg->cg_cs, in pass5()
299 (void) memmove((void *)cs, (void *)&newcg->cg_cs, in pass5()
307 (void) memmove((void *)cg, (void *)newcg, in pass5()
312 (void *)&cg_blktot(newcg)[0], sumsize); in pass5()
317 excessdirs = cg->cg_cs.cs_ndir - newcg->cg_cs.cs_ndir; in pass5()
324 if (check_maps((uchar_t *)cg_inosused(newcg), in pass5()
332 (void *)cg_inosused(newcg), in pass5()
343 if (check_maps((uchar_t *)cg_inosused(newcg), in pass5()
350 (void *)cg_inosused(newcg), inomapsize); in pass5()
360 (uchar_t *)cg_blksfree(newcg), blkmapsize, in pass5()
366 (void *)cg_blksfree(newcg), blkmapsize); in pass5()
376 (void *)&cg_blks(fs, newcg, 0)[0], in pass5()
385 (void *)&cg_blks(fs, newcg, 0)[0], in pass5()
397 (void *)&cg_blktot(newcg)[0], in pass5()
406 (void *)&cg_blktot(newcg)[0], in pass5()