Lines Matching defs:fs
88 #include <ufs/ffs/fs.h>
112 register struct fs *fs;
142 fs = ip->i_fs;
147 if (fs->fs_inodefmt < FS_44INODEFMT) { /* XXX */
152 (daddr64_t)((unsigned)fsbtodb(fs, ino_to_fsba(fs, ip->i_number))),
153 (int)fs->fs_bsize, NOCRED, &bp)) {
159 byte_swap_inode_out(ip, ((struct dinode *)buf_dataptr(bp) + ino_to_fsbo(fs, ip->i_number)));
162 *((struct dinode *)buf_dataptr(bp) + ino_to_fsbo(fs, ip->i_number)) = ip->i_din;
184 struct fs *fs;
203 fs = oip->i_fs;
205 if (length > fs->fs_maxfilesize)
237 offset = blkoff(fs, length - 1);
238 lbn = lblkno(fs, length - 1);
275 offset = blkoff(fs, length);
279 lbn = lblkno(fs, length);
286 size = blksize(fs, oip, lbn);
305 lastblock = lblkno(fs, length + fs->fs_bsize - 1) - 1;
307 lastiblock[DOUBLE] = lastiblock[SINGLE] - NINDIR(fs);
308 lastiblock[TRIPLE] = lastiblock[DOUBLE] - NINDIR(fs) * NINDIR(fs);
311 nblocks = btodb(fs->fs_bsize, devBlockSize);
350 indir_lbn[DOUBLE] = indir_lbn[SINGLE] - NINDIR(fs) - 1;
351 indir_lbn[TRIPLE] = indir_lbn[DOUBLE] - NINDIR(fs) * NINDIR(fs) - 1;
356 fsbtodb(fs, bn), lastiblock[level], level, &count);
362 ffs_blkfree(oip, bn, fs->fs_bsize);
380 bsize = blksize(fs, oip, i);
399 oldspace = blksize(fs, oip, lastblock);
401 newspace = blksize(fs, oip, lastblock);
410 bn += numfrags(fs, newspace);
462 register struct fs *fs = ip->i_fs;
482 factor *= NINDIR(fs);
488 nblocks = btodb(fs->fs_bsize, devBlockSize);
495 tbp = buf_geteblk(fs->fs_bsize);
508 bp = buf_getblk(vp, (daddr64_t)((unsigned)lbn), (int)fs->fs_bsize, 0, 0, BLK_META);
512 trace(TR_BREADHIT, pack(vp, fs->fs_bsize), lbn);
514 trace(TR_BREADMISS, pack(vp, fs->fs_bsize), lbn);
531 bcopy((caddr_t)bap, (caddr_t)copy, (u_int)fs->fs_bsize);
533 (u_int)(NINDIR(fs) - (last + 1)) * sizeof (ufs_daddr_t));
549 for (i = NINDIR(fs) - 1, nlbn = lbn + 1 - i * factor; i > last;
563 if (error = ffs_indirtrunc(ip, nlbn, fsbtodb(fs, nb),
568 ffs_blkfree(ip, nb, fs->fs_bsize);
587 if (error = ffs_indirtrunc(ip, nlbn, fsbtodb(fs, nb),