Lines Matching defs:frag
42 * (INT_MAX) times the maximum number of sectors per frag. Since
43 * the maximum frag size is MAXBSIZE, the maximum number of sectors
44 * per frag is MAXBSIZE/DEV_BSIZE.
852 * frag size can't be any larger than a file system
896 * contains the inode and frag bigmaps, must fit
906 * * frag size
1069 * Since the maximum allocatable unit (the frag) must be less than
2861 * allocate a block or frag
2866 int i, frag;
2899 frag = howmany(size, sblock.fs_fsize);
2900 fscs[0].cs_nffree += sblock.fs_frag - frag;
2901 sblock.fs_cstotal.cs_nffree += sblock.fs_frag - frag;
2902 acg.cg_cs.cs_nffree += sblock.fs_frag - frag;
2903 acg.cg_frsum[sblock.fs_frag - frag]++;
2904 for (i = frag; i < sblock.fs_frag; i++)
4298 daddr32_t ofrag; /* old frag */
4299 daddr32_t nfrag; /* new frag */
4314 csfraginrange(daddr32_t frag)
4316 return ((frag >= mincsfrag) && (frag <= maxcsfrag));
4320 findcsfrag(daddr32_t frag, struct csfrag **cfap)
4324 if (!csfraginrange(frag))
4328 if (cfp->ofrag == frag)
4334 checkindirect(ino_t ino, daddr32_t *fragsp, daddr32_t frag, int level)
4340 if (frag == 0)
4343 rdfs(fsbtodb(&sblock, frag), (int)sblock.fs_bsize,
4354 addcsfrag(ino_t ino, daddr32_t frag, struct csfrag **cfap)
4361 if (frag > maxcsfrag)
4362 maxcsfrag = frag;
4363 if (frag < mincsfrag)
4364 mincsfrag = frag;
4367 * if this frag belongs to an inode and is not the start of a block
4368 * then see if it is part of a frag range for this inode
4370 if (ino && (frag % sblock.fs_frag))
4374 if (frag != cfp->ofrag + cfp->frags)
4386 cfp->ofrag = frag;
4391 if (frag < curr->ofrag) {
4409 delcsfrag(daddr32_t frag, struct csfrag **cfap)
4415 * free up entry whose beginning frag matches
4418 if (frag == (*cfpp)->ofrag) {
4432 * For each such frag found, decrement the frag count pointed to by fragsp.
4442 diskaddr_t frag;
4448 if ((frag = *db++) != 0) {
4451 if (found || (found = csfraginrange(frag))) {
4452 addcsfrag(ino, frag, &csfragino);
4453 delcsfrag(frag, &csfrag);
4455 ++frag;
4472 * summary info range. Move the affected frag from the
4501 fixindirect(daddr32_t frag, int level)
4507 if (frag == 0)
4510 rdfs(fsbtodb(&sblock, (uint64_t)frag), (int)sblock.fs_bsize,
4513 fixdirect((caddr_t)fsb, frag, fsb, ne);
4521 fixdirect(caddr_t bp, daddr32_t frag, daddr32_t *db, int ne)
4533 wtfs(fsbtodb(&sblock, (uint64_t)frag), (int)sblock.fs_bsize,
4590 checkfragallocated(daddr32_t frag)
4595 * frag is smaller then the one in the list.
4597 for (cfp = csfragfree; cfp != NULL && frag >= cfp->ofrag;
4599 if (frag == cfp->ofrag)
4602 for (cfp = csfragino; cfp != NULL && frag >= cfp->ofrag;
4604 if (frag == cfp->ofrag && cfp->nfrag != 0)
4869 * If any element in the csfragino array has a "new frag location"
4871 * space for moving the frag represented by this array element.
4903 * For each frag in the "as-yet-unclassified" list (csfrag), see if
4904 * it's free (i.e., its bit is set in the free frag bit map). If so,
4914 * move free frags onto the free-frag list
4992 * Allocate a free-frag range in an old cylinder group
5016 * For each frag that needs to be moved (each frag or range of frags in
5017 * the csfragino list), allocate a new location and store the frag number
5019 * If a new frag can't be allocated for any element in the csfragino list,
5020 * set the new frag number for that element to 0 and return immediately.
5029 * allocate space for inode frag ranges
5055 freefrags(daddr32_t frag, long frags, long cylno)
5064 setbit(cg_blksfree(&acg), (frag+i) - cgbase(&sblock, cylno));
5535 * fragsize - frag size
5577 * representable in the frag bitmaps in the cylinder overhead block and the
5580 * value, given the frag and nrpos vales, is:
5592 * # cylinder in the frag bitmap
5629 int spf; /* sectors per frag */