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