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.
848 * frag size can't be any larger than a file system
892 * contains the inode and frag bigmaps, must fit
902 * * frag size
1065 * Since the maximum allocatable unit (the frag) must be less than
2840 * allocate a block or frag
2845 int i, frag;
2878 frag = howmany(size, sblock.fs_fsize);
2879 fscs[0].cs_nffree += sblock.fs_frag - frag;
2880 sblock.fs_cstotal.cs_nffree += sblock.fs_frag - frag;
2881 acg.cg_cs.cs_nffree += sblock.fs_frag - frag;
2882 acg.cg_frsum[sblock.fs_frag - frag]++;
2883 for (i = frag; i < sblock.fs_frag; i++)
4274 daddr32_t ofrag; /* old frag */
4275 daddr32_t nfrag; /* new frag */
4290 csfraginrange(daddr32_t frag)
4292 return ((frag >= mincsfrag) && (frag <= maxcsfrag));
4296 findcsfrag(daddr32_t frag, struct csfrag **cfap)
4300 if (!csfraginrange(frag))
4304 if (cfp->ofrag == frag)
4310 checkindirect(ino_t ino, daddr32_t *fragsp, daddr32_t frag, int level)
4316 if (frag == 0)
4319 rdfs(fsbtodb(&sblock, frag), (int)sblock.fs_bsize,
4330 addcsfrag(ino_t ino, daddr32_t frag, struct csfrag **cfap)
4337 if (frag > maxcsfrag)
4338 maxcsfrag = frag;
4339 if (frag < mincsfrag)
4340 mincsfrag = frag;
4343 * if this frag belongs to an inode and is not the start of a block
4344 * then see if it is part of a frag range for this inode
4346 if (ino && (frag % sblock.fs_frag))
4350 if (frag != cfp->ofrag + cfp->frags)
4362 cfp->ofrag = frag;
4367 if (frag < curr->ofrag) {
4385 delcsfrag(daddr32_t frag, struct csfrag **cfap)
4391 * free up entry whose beginning frag matches
4394 if (frag == (*cfpp)->ofrag) {
4408 * For each such frag found, decrement the frag count pointed to by fragsp.
4418 diskaddr_t frag;
4424 if ((frag = *db++) != 0) {
4427 if (found || (found = csfraginrange(frag))) {
4428 addcsfrag(ino, frag, &csfragino);
4429 delcsfrag(frag, &csfrag);
4431 ++frag;
4448 * summary info range. Move the affected frag from the
4477 fixindirect(daddr32_t frag, int level)
4483 if (frag == 0)
4486 rdfs(fsbtodb(&sblock, (uint64_t)frag), (int)sblock.fs_bsize,
4489 fixdirect((caddr_t)fsb, frag, fsb, ne);
4497 fixdirect(caddr_t bp, daddr32_t frag, daddr32_t *db, int ne)
4509 wtfs(fsbtodb(&sblock, (uint64_t)frag), (int)sblock.fs_bsize,
4566 checkfragallocated(daddr32_t frag)
4571 * frag is smaller then the one in the list.
4573 for (cfp = csfragfree; cfp != NULL && frag >= cfp->ofrag;
4575 if (frag == cfp->ofrag)
4578 for (cfp = csfragino; cfp != NULL && frag >= cfp->ofrag;
4580 if (frag == cfp->ofrag && cfp->nfrag != 0)
4845 * If any element in the csfragino array has a "new frag location"
4847 * space for moving the frag represented by this array element.
4879 * For each frag in the "as-yet-unclassified" list (csfrag), see if
4880 * it's free (i.e., its bit is set in the free frag bit map). If so,
4890 * move free frags onto the free-frag list
4968 * Allocate a free-frag range in an old cylinder group
4992 * For each frag that needs to be moved (each frag or range of frags in
4993 * the csfragino list), allocate a new location and store the frag number
4995 * If a new frag can't be allocated for any element in the csfragino list,
4996 * set the new frag number for that element to 0 and return immediately.
5005 * allocate space for inode frag ranges
5031 freefrags(daddr32_t frag, long frags, long cylno)
5040 setbit(cg_blksfree(&acg), (frag+i) - cgbase(&sblock, cylno));
5511 * fragsize - frag size
5553 * representable in the frag bitmaps in the cylinder overhead block and the
5556 * value, given the frag and nrpos vales, is:
5568 * # cylinder in the frag bitmap
5605 int spf; /* sectors per frag */