Lines Matching +full:de +full:- +full:skew

1 /* SPDX-License-Identifier: GPL-2.0 */
6 * Adrian Rodriguez (adrian@franklins-tower.rutgers.edu)
12 * 64-bit clean thanks to Maciej W. Rozycki <macro@ds2.pg.gda.pl>
16 * on code by Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de>.
63 * A filesystem is described by its super-block, which in turn
64 * describes the cylinder groups. The super-block is critical
67 * super-block data does not change, so the copies need not be
72 * [fs->fs_sblkno] Super-block
73 * [fs->fs_cblkno] Cylinder group block
74 * [fs->fs_iblkno] Inode blocks
75 * [fs->fs_dblkno] Data blocks
87 * given in byte-offset form, so they do not imply a sector size. The
96 { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 }
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)
152 /* Solaris-specific fs_clean values */
186 #define UFS_42INODEFMT -1
208 #define ufs_fsbtodb(uspi, b) ((b) << (uspi)->s_fsbtodb)
209 #define ufs_dbtofsb(uspi, b) ((b) >> (uspi)->s_fsbtodb)
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)
240 ((UFS_SB(sb)->s_flags & UFS_CG_SUN) ? \
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)
274 #define UFS2_NOCSPTRS ((128 / sizeof(void *)) - 4)
283 #define UFS_DIR_ROUND (UFS_DIR_PAD - 1)
335 #define UFS_MULTILABEL 0x20 /* file system is MAC multi-label */
355 __fs32 fs_sblkno; /* addr of super-block in filesys */
356 __fs32 fs_cblkno; /* offset of cyl-block in filesys */
357 __fs32 fs_iblkno; /* offset of inode-blocks in filesys */
361 __fs32 fs_time; /* last time written -- time_t */
401 __fs32 fs_trackskew; /* sector 0 skew, per track */
421 /* this data must be re-computed after crashes */
426 __s8 fs_ronly; /* mounted read-only flag */
440 __fs64 fs_swuid; /* system-wide uid */
482 __fs32 fs_inodefmt; /* format of on-disk inodes */
507 #define UFS_42POSTBLFMT -1 /* 4.2BSD rotational table format */
519 * super block lock fs->fs_lock.
523 (fs32_to_cpu((sb), (ucg)->cg_magic) == CG_MAGIC)
527 #define ufs_ocg_blktot(sb, ucg) fs32_to_cpu((sb), ((struct ufs_old_cylinder_group *)(ucg))->cg…
528 #define ufs_ocg_blks(sb, ucg, cylno) fs32_to_cpu((sb), ((struct ufs_old_cylinder_group *)(ucg))->cg…
529 #define ufs_ocg_inosused(sb, ucg) fs32_to_cpu((sb), ((struct ufs_old_cylinder_group *)(ucg))->cg…
530 #define ufs_ocg_blksfree(sb, ucg) fs32_to_cpu((sb), ((struct ufs_old_cylinder_group *)(ucg))->cg…
532 (fs32_to_cpu((sb), ((struct ufs_old_cylinder_group *)(ucg))->cg_magic) == CG_MAGIC)
601 * structure of an on-disk inode
625 __fs32 ui_flags; /* 0x64 immutable, append-only... */
688 #define UFS_UF_APPEND 0x00000004 /* append-only */
695 #define UFS_SF_APPEND 0x00040000 /* append-only */
731 __u32 s_sblkno; /* offset of super-blocks in filesys */
732 __u32 s_cblkno; /* offset of cg-block in filesys */
733 __u32 s_iblkno; /* offset of inode-blocks in filesys */
758 __u32 s_trackskew; /* sector 0 skew, per track */
873 __s8 fs_fsmnt[UFS_MAXMNTLEN - 212];
888 __s8 fs_fsmnt[UFS2_MAXMNTLEN - UFS_MAXMNTLEN + 212];
947 __fs32 fs_inodefmt; /* format of on-disk inodes */