Lines Matching refs:uspi
134 #define UFS_NDIR_FRAGMENT (UFS_NDADDR << uspi->s_fpbshift)
135 #define UFS_IND_FRAGMENT (UFS_IND_BLOCK << uspi->s_fpbshift)
136 #define UFS_DIND_FRAGMENT (UFS_DIND_BLOCK << uspi->s_fpbshift)
137 #define UFS_TIND_FRAGMENT (UFS_TIND_BLOCK << uspi->s_fpbshift)
208 #define ufs_fsbtodb(uspi, b) ((b) << (uspi)->s_fsbtodb) argument
209 #define ufs_dbtofsb(uspi, b) ((b) >> (uspi)->s_fsbtodb) argument
215 #define ufs_cgbase(c) (uspi->s_fpg * (c))
216 #define ufs_cgstart(c) ((uspi)->fs_magic == UFS2_MAGIC ? ufs_cgbase(c) : \
217 (ufs_cgbase(c) + uspi->s_cgoffset * ((c) & ~uspi->s_cgmask)))
218 #define ufs_cgsblock(c) (ufs_cgstart(c) + uspi->s_sblkno) /* super blk */
219 #define ufs_cgcmin(c) (ufs_cgstart(c) + uspi->s_cblkno) /* cg block */
220 #define ufs_cgimin(c) (ufs_cgstart(c) + uspi->s_iblkno) /* inode blk */
221 #define ufs_cgdmin(c) (ufs_cgstart(c) + uspi->s_dblkno) /* 1st data */
229 #define ufs_inotocg(x) ((x) / uspi->s_ipg)
230 #define ufs_inotocgoff(x) ((x) % uspi->s_ipg)
231 #define ufs_inotofsba(x) (((u64)ufs_cgimin(ufs_inotocg(x))) + ufs_inotocgoff(x) / uspi->s_inopf)
232 #define ufs_inotofsbo(x) ((x) % uspi->s_inopf)
238 ((bno) * uspi->s_nspf / uspi->s_spc)
241 (((((bno) * uspi->s_nspf % uspi->s_spc) % \
242 uspi->s_nsect) * \
243 uspi->s_nrpos) / uspi->s_nsect) \
245 ((((bno) * uspi->s_nspf % uspi->s_spc / uspi->s_nsect \
246 * uspi->s_trackskew + (bno) * uspi->s_nspf % uspi->s_spc \
247 % uspi->s_nsect * uspi->s_interleave) % uspi->s_nsect \
248 * uspi->s_nrpos) / uspi->s_npsect))
255 #define ufs_blkoff(loc) ((loc) & uspi->s_qbmask)
256 #define ufs_fragoff(loc) ((loc) & uspi->s_qfmask)
257 #define ufs_lblktosize(blk) ((blk) << uspi->s_bshift)
258 #define ufs_lblkno(loc) ((loc) >> uspi->s_bshift)
259 #define ufs_numfrags(loc) ((loc) >> uspi->s_fshift)
260 #define ufs_blkroundup(size) (((size) + uspi->s_qbmask) & uspi->s_bmask)
261 #define ufs_fragroundup(size) (((size) + uspi->s_qfmask) & uspi->s_fmask)
262 #define ufs_fragstoblks(frags) ((frags) >> uspi->s_fpbshift)
263 #define ufs_blkstofrags(blks) ((blks) << uspi->s_fpbshift)
264 #define ufs_fragnum(fsb) ((fsb) & uspi->s_fpbmask)
265 #define ufs_blknum(fsb) ((fsb) & ~uspi->s_fpbmask)