Go to the documentation of this file.
38 #define ROOTINO ((ino_t)2)
41 #define DEV_BSIZE (1<<DEV_BSHIFT)
42 #define SBLOCK_FLOPPY 0
43 #define SBLOCK_UFS1 8192
44 #define SBLOCK_UFS2 65536
45 #define SBLOCK_PIGGY 262144
46 #define SBLOCKSIZE 8192
47 #define SBLOCKSEARCH { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 }
48 #define FS_UFS1_MAGIC 0x011954
49 #define FS_UFS2_MAGIC 0x19540119
52 #define NOCSPTRS ((128 / sizeof(void *)) - 4)
54 #define MAXBSIZE 65536
55 #define NINDIR(fs) ((fs)->fs_nindir)
61 #define cgbase(fs, c) (((ufs2_daddr_t)(fs)->fs_fpg) * (c))
62 #define cgdmin(fs, c) (cgstart(fs, c) + (fs)->fs_dblkno)
63 #define cgimin(fs, c) (cgstart(fs, c) + (fs)->fs_iblkno)
64 #define cgsblock(fs, c) (cgstart(fs, c) + (fs)->fs_sblkno)
65 #define cgtod(fs, c) (cgstart(fs, c) + (fs)->fs_cblkno)
66 #define cgstart(fs, c) ((fs)->fs_magic == FS_UFS2_MAGIC ? cgbase(fs, c) : (cgbase(fs, c) + (fs)->fs_old_cgoffset * ((c) & ~((fs)->fs_old_cgmask))))
68 #define fsbtodb(fs, b) ((daddr_t)(b) << (fs)->fs_fsbtodb)
69 #define dbtofsb(fs, b) ((b) >> (fs)->fs_fsbtodb)
77 #define ino_to_cg(fs, x) ((x) / (fs)->fs_ipg)
78 #define ino_to_fsba(fs, x) ((ufs2_daddr_t)(cgimin(fs, ino_to_cg(fs, x)) + (blkstofrags((fs), (((x) % (fs)->fs_ipg) / INOPB(fs))))))
79 #define ino_to_fsbo(fs, x) ((x) % INOPB(fs))
81 #define blkoff(fs, loc) ((loc) & (fs)->fs_qbmask) // calculates (loc % fs->fs_bsize)
82 #define lblkno(fs, loc) ((loc) >> (fs)->fs_bshift) // calculates (loc / fs->fs_bsize)
83 #define fragroundup(fs, size) (((size) + (fs)->fs_qfmask) & (fs)->fs_fmask) // calculates roundup(size, fs->fs_fsize)
85 #define sblksize(fs, size, lbn) (((lbn) >= NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) ? (fs)->fs_bsize : (fragroundup(fs, blkoff(fs, (size)))))
u_int32_t fs_pendinginodes
int32_t fs_old_interleave
struct csum_total fs_cstotal
int32_t fs_old_postblformat
int32_t fs_sparecon32[23]
unsigned short __uint16_t
int64_t fs_sparecon64[14]
union ufs1_dinode::@21 di_u
struct csum fs_old_cstotal
void * fs_ocsp[((128/sizeof(void *)) - 4)]