UbixOS V2 2.0

ufs.h
Go to the documentation of this file.
1 /*****************************************************************************************
2 Copyright (c) 2002-2004, 2017 The UbixOS Project
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without modification, are
6 permitted provided that the following conditions are met:
7
8 Redistributions of source code must retain the above copyright notice, this list of
9 conditions, the following disclaimer and the list of authors. Redistributions in binary
10 form must reproduce the above copyright notice, this list of conditions, the following
11 disclaimer and the list of authors in the documentation and/or other materials provided
12 with the distribution. Neither the name of the UbixOS Project nor the names of its
13 contributors may be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
17 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
19 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
21 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
23 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
26 $Id: ufs.h 141 2016-01-17 02:05:18Z reddawg $
27
28 *****************************************************************************************/
29
30 #ifndef _UFS_H
31 #define _UFS_H
32
33 #include <sys/types.h>
34 #include <sys/device.h>
35
36 #define DT_REG 8
37 #define MAXNAMLEN 255
38 #define ROOTINO ((ino_t)2)
39 #define DT_DIR 4
40 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
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 /* UFS1 fast filesystem magic number */
49 #define FS_UFS2_MAGIC 0x19540119 /* UFS2 fast filesystem magic number */
50 #define MAXMNTLEN 468
51 #define MAXVOLLEN 32
52 #define NOCSPTRS ((128 / sizeof(void *)) - 4)
53 #define FSMAXSNAP 20
54 #define MAXBSIZE 65536
55 #define NINDIR(fs) ((fs)->fs_nindir)
56
57 /*
58 * Cylinder group macros to locate things in cylinder groups.
59 * They calc filesystem addresses of cylinder group data structures.
60 */
61 #define cgbase(fs, c) (((ufs2_daddr_t)(fs)->fs_fpg) * (c))
62 #define cgdmin(fs, c) (cgstart(fs, c) + (fs)->fs_dblkno) /* 1st data */
63 #define cgimin(fs, c) (cgstart(fs, c) + (fs)->fs_iblkno) /* inode blk */
64 #define cgsblock(fs, c) (cgstart(fs, c) + (fs)->fs_sblkno) /* super blk */
65 #define cgtod(fs, c) (cgstart(fs, c) + (fs)->fs_cblkno) /* cg block */
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))))
67
68 #define fsbtodb(fs, b) ((daddr_t)(b) << (fs)->fs_fsbtodb)
69 #define dbtofsb(fs, b) ((b) >> (fs)->fs_fsbtodb)
70
71 /*
72 * Macros for handling inode numbers:
73 * inode number to filesystem block offset.
74 * inode number to cylinder group number.
75 * inode number to filesystem block address.
76 */
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))
80
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)
84
85 #define sblksize(fs, size, lbn) (((lbn) >= NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) ? (fs)->fs_bsize : (fragroundup(fs, blkoff(fs, (size)))))
86
87 typedef int32_t ufs1_daddr_t;
88 typedef int64_t ufs2_daddr_t;
89 typedef int64_t ufs_lbn_t;
90 typedef int64_t ufs_time_t;
91 // MrOlsen (2016-01-16) NOTE: typedef __int64_t daddr_t;
92
93 struct dirent {
94 __uint32_t d_fileno; /* file number of entry */
95 __uint16_t d_reclen; /* length of this record */
96 __uint8_t d_type; /* file type, see below */
97 __uint8_t d_namlen; /* length of string in d_name */
98 char d_name[MAXNAMLEN + 1]; /* name must be no longer than this */
99 };
100
101 #define NXADDR 2 /* External addresses in inode. */
102 #define NDADDR 12 /* Direct addresses in inode. */
103 #define NIADDR 3 /* Indirect addresses in inode. */
104
105 struct ufs2_dinode {
106 u_int16_t di_mode; /* 0: IFMT, permissions; see below. */
107 int16_t di_nlink; /* 2: File link count. */
108 uint32_t di_uid; /* 4: File owner. */
109 uint32_t di_gid; /* 8: File group. */
110 uint32_t di_blksize; /* 12: Inode blocksize. */
111 u_int64_t di_size; /* 16: File byte count. */
112 u_int64_t di_blocks; /* 24: Bytes actually held. */
113 ufs_time_t di_atime; /* 32: Last access time. */
114 ufs_time_t di_mtime; /* 40: Last modified time. */
115 ufs_time_t di_ctime; /* 48: Last inode change time. */
116 ufs_time_t di_birthtime; /* 56: Inode creation time. */
117 int32_t di_mtimensec; /* 64: Last modified time. */
118 int32_t di_atimensec; /* 68: Last access time. */
119 int32_t di_ctimensec; /* 72: Last inode change time. */
120 int32_t di_birthnsec; /* 76: Inode creation time. */
121 int32_t di_gen; /* 80: Generation number. */
122 uint32_t di_kernflags; /* 84: Kernel flags. */
123 uint32_t di_flags; /* 88: Status flags (chflags). */
124 int32_t di_extsize; /* 92: External attributes block. */
125 ufs2_daddr_t di_extb[NXADDR];/* 96: External attributes block. */
126 ufs2_daddr_t di_db[NDADDR]; /* 112: Direct disk blocks. */
127 ufs2_daddr_t di_ib[NIADDR]; /* 208: Indirect disk blocks. */
128 int64_t di_spare[3]; /* 232: Reserved; currently unused */
129 };
130
131 struct ufs1_dinode {
132 u_int16_t di_mode; /* 0: IFMT, permissions; see below. */
133 int16_t di_nlink; /* 2: File link count. */
134 union {
135 u_int16_t oldids[2]; /* 4: Ffs: old user and group ids. */
136 } di_u;
137 u_int64_t di_size; /* 8: File byte count. */
138 int32_t di_atime; /* 16: Last access time. */
139 int32_t di_atimensec; /* 20: Last access time. */
140 int32_t di_mtime; /* 24: Last modified time. */
141 int32_t di_mtimensec; /* 28: Last modified time. */
142 int32_t di_ctime; /* 32: Last inode change time. */
143 int32_t di_ctimensec; /* 36: Last inode change time. */
144 ufs1_daddr_t di_db[NDADDR]; /* 40: Direct disk blocks. */
145 ufs1_daddr_t di_ib[NIADDR]; /* 88: Indirect disk blocks. */
146 uint32_t di_flags; /* 100: Status flags (chflags). */
147 int32_t di_blocks; /* 104: Blocks actually held. */
148 int32_t di_gen; /* 108: Generation number. */
149 uint32_t di_uid; /* 112: File owner. */
150 uint32_t di_gid; /* 116: File group. */
151 int32_t di_spare[2]; /* 120: Reserved; currently unused */
152 };
153
154 struct csum {
155 int32_t cs_ndir; /* number of directories */
156 int32_t cs_nbfree; /* number of free blocks */
157 int32_t cs_nifree; /* number of free inodes */
158 int32_t cs_nffree; /* number of free frags */
159 };
160 struct csum_total {
161 int64_t cs_ndir; /* number of directories */
162 int64_t cs_nbfree; /* number of free blocks */
163 int64_t cs_nifree; /* number of free inodes */
164 int64_t cs_nffree; /* number of free frags */
165 int64_t cs_numclusters; /* number of free clusters */
166 int64_t cs_spare[3]; /* future expansion */
167 };
168
169 struct fs {
170 int32_t fs_firstfield; /* historic filesystem linked list, */
171 int32_t fs_unused_1; /* used for incore super blocks */
172 int32_t fs_sblkno; /* offset of super-block in filesys */
173 int32_t fs_cblkno; /* offset of cyl-block in filesys */
174 int32_t fs_iblkno; /* offset of inode-blocks in filesys */
175 int32_t fs_dblkno; /* offset of first data after cg */
176 int32_t fs_old_cgoffset; /* cylinder group offset in cylinder */
177 int32_t fs_old_cgmask; /* used to calc mod fs_ntrak */
178 int32_t fs_old_time; /* last time written */
179 int32_t fs_old_size; /* number of blocks in fs */
180 int32_t fs_old_dsize; /* number of data blocks in fs */
181 int32_t fs_ncg; /* number of cylinder groups */
182 int32_t fs_bsize; /* size of basic blocks in fs */
183 int32_t fs_fsize; /* size of frag blocks in fs */
184 int32_t fs_frag; /* number of frags in a block in fs */
185 /* these are configuration parameters */
186 int32_t fs_minfree; /* minimum percentage of free blocks */
187 int32_t fs_old_rotdelay; /* num of ms for optimal next block */
188 int32_t fs_old_rps; /* disk revolutions per second */
189 /* these fields can be computed from the others */
190 int32_t fs_bmask; /* ``blkoff'' calc of blk offsets */
191 int32_t fs_fmask; /* ``fragoff'' calc of frag offsets */
192 int32_t fs_bshift; /* ``lblkno'' calc of logical blkno */
193 int32_t fs_fshift; /* ``numfrags'' calc number of frags */
194 /* these are configuration parameters */
195 int32_t fs_maxcontig; /* max number of contiguous blks */
196 int32_t fs_maxbpg; /* max number of blks per cyl group */
197 /* these fields can be computed from the others */
198 int32_t fs_fragshift; /* block to frag shift */
199 int32_t fs_fsbtodb; /* fsbtodb and dbtofsb shift constant */
200 int32_t fs_sbsize; /* actual size of super block */
201 int32_t fs_spare1[2]; /* old fs_csmask */
202 /* old fs_csshift */
203 int32_t fs_nindir; /* value of NINDIR */
204 int32_t fs_inopb; /* value of INOPB */
205 int32_t fs_old_nspf; /* value of NSPF */
206 /* yet another configuration parameter */
207 int32_t fs_optim; /* optimization preference, see below */
208 int32_t fs_old_npsect; /* # sectors/track including spares */
209 int32_t fs_old_interleave; /* hardware sector interleave */
210 int32_t fs_old_trackskew; /* sector 0 skew, per track */
211 int32_t fs_id[2]; /* unique filesystem id */
212 /* sizes determined by number of cylinder groups and their sizes */
213 int32_t fs_old_csaddr; /* blk addr of cyl grp summary area */
214 int32_t fs_cssize; /* size of cyl grp summary area */
215 int32_t fs_cgsize; /* cylinder group size */
216 int32_t fs_spare2; /* old fs_ntrak */
217 int32_t fs_old_nsect; /* sectors per track */
218 int32_t fs_old_spc; /* sectors per cylinder */
219 int32_t fs_old_ncyl; /* cylinders in filesystem */
220 int32_t fs_old_cpg; /* cylinders per group */
221 int32_t fs_ipg; /* inodes per group */
222 int32_t fs_fpg; /* blocks per group * fs_frag */
223 /* this data must be re-computed after crashes */
224 struct csum fs_old_cstotal; /* cylinder summary information */
225 /* these fields are cleared at mount time */
226 int8_t fs_fmod; /* super block modified flag */
227 int8_t fs_clean; /* filesystem is clean flag */
228 int8_t fs_ronly; /* mounted read-only flag */
229 int8_t fs_old_flags; /* old FS_ flags */
230 u_char fs_fsmnt[MAXMNTLEN]; /* name mounted on */
231 u_char fs_volname[MAXVOLLEN]; /* volume name */
232 u_int64_t fs_swuid; /* system-wide uid */
233 int32_t fs_pad; /* due to alignment of fs_swuid */
234 /* these fields retain the current block allocation info */
235 int32_t fs_cgrotor; /* last cg searched */
236 void *fs_ocsp[NOCSPTRS]; /* padding; was list of fs_cs buffers */
237 u_int8_t *fs_contigdirs; /* (u) # of contig. allocated dirs */
238 struct csum *fs_csp; /* (u) cg summary info buffer */
239 int32_t *fs_maxcluster; /* (u) max cluster in each cyl group */
240 u_int *fs_active; /* (u) used by snapshots to track fs */
241 int32_t fs_old_cpc; /* cyl per cycle in postbl */
242 int32_t fs_maxbsize; /* maximum blocking factor permitted */
243 int64_t fs_sparecon64[17]; /* old rotation block list head */
244 int64_t fs_sblockloc; /* byte offset of standard superblock */
245 struct csum_total fs_cstotal; /* (u) cylinder summary information */
246 ufs_time_t fs_time; /* last time written */
247 int64_t fs_size; /* number of blocks in fs */
248 int64_t fs_dsize; /* number of data blocks in fs */
249 ufs2_daddr_t fs_csaddr; /* blk addr of cyl grp summary area */
250 int64_t fs_pendingblocks; /* (u) blocks being freed */
251 int32_t fs_pendinginodes; /* (u) inodes being freed */
252 int32_t fs_snapinum[FSMAXSNAP];/* list of snapshot inode numbers */
253 int32_t fs_avgfilesize; /* expected average file size */
254 int32_t fs_avgfpdir; /* expected # of files per directory */
255 int32_t fs_save_cgsize; /* save real cg size to use fs_bsize */
256 int32_t fs_sparecon32[26]; /* reserved for future constants */
257 int32_t fs_flags; /* see FS_ flags below */
258 int32_t fs_contigsumsize; /* size of cluster summary array */
259 int32_t fs_maxsymlinklen; /* max length of an internal symlink */
260 int32_t fs_old_inodefmt; /* format of on-disk inodes */
261 u_int64_t fs_maxfilesize; /* maximum representable file size */
262 int64_t fs_qbmask; /* ~fs_bmask for use with 64-bit size */
263 int64_t fs_qfmask; /* ~fs_fmask for use with 64-bit size */
264 int32_t fs_state; /* validate fs_clean field */
265 int32_t fs_old_postblformat; /* format of positional layout tables */
266 int32_t fs_old_nrpos; /* number of rotational positions */
267 int32_t fs_spare5[2]; /* old fs_postbloff */
268 /* old fs_rotbloff */
269 int32_t fs_magic; /* magic number */
270 };
271
272 int ufs_init();
273 int ufs_initialize();
274
275 #endif
276
277 /***
278 END
279 ***/
fs::fs_fpg
int32_t fs_fpg
Definition: fs.h:313
fs::fs_pendinginodes
u_int32_t fs_pendinginodes
Definition: fs.h:345
fs::fs_magic
int32_t fs_magic
Definition: fs.h:365
fs::fs_cgrotor
int32_t fs_cgrotor
Definition: fs.h:326
csum
Definition: fs.h:242
fs::fs_maxsymlinklen
int32_t fs_maxsymlinklen
Definition: fs.h:355
fs::fs_sblkno
int32_t fs_sblkno
Definition: fs.h:263
ufs1_dinode::di_mode
u_int16_t di_mode
Definition: ufs.h:131
fs::fs_old_interleave
int32_t fs_old_interleave
Definition: fs.h:300
ufs2_dinode::di_size
u_int64_t di_size
Definition: ufs.h:110
fs::fs_nindir
int32_t fs_nindir
Definition: fs.h:294
__uint8_t
unsigned char __uint8_t
Definition: _types.h:34
fs::fs_cstotal
struct csum_total fs_cstotal
Definition: fs.h:339
fs::fs_optim
int32_t fs_optim
Definition: fs.h:298
fs::fs_cgsize
int32_t fs_cgsize
Definition: fs.h:306
ufs1_dinode::di_flags
uint32_t di_flags
Definition: ufs.h:145
fs::fs_old_ncyl
int32_t fs_old_ncyl
Definition: fs.h:310
ufs1_dinode::di_spare
int32_t di_spare[2]
Definition: ufs.h:150
dirent::d_namlen
__uint8_t d_namlen
Definition: ufs.h:96
ufs2_dinode::di_mtime
ufs_time_t di_mtime
Definition: ufs.h:113
ufs1_daddr_t
int32_t ufs1_daddr_t
Definition: ufs.h:86
MAXNAMLEN
#define MAXNAMLEN
Definition: ufs.h:36
fs::fs_contigsumsize
int32_t fs_contigsumsize
Definition: fs.h:354
__uint32_t
unsigned int __uint32_t
Definition: _types.h:38
fs::fs_old_postblformat
int32_t fs_old_postblformat
Definition: fs.h:361
fs::fs_old_cgoffset
int32_t fs_old_cgoffset
Definition: fs.h:267
fs::fs_old_rotdelay
int32_t fs_old_rotdelay
Definition: fs.h:278
ufs1_dinode::di_ctime
int32_t di_ctime
Definition: ufs.h:141
fs::fs_cblkno
int32_t fs_cblkno
Definition: fs.h:264
fs::fs_old_inodefmt
int32_t fs_old_inodefmt
Definition: fs.h:356
int16_t
__int16_t int16_t
Definition: types.h:103
ufs1_dinode::di_nlink
int16_t di_nlink
Definition: ufs.h:132
fs::fs_unused_1
int32_t fs_unused_1
Definition: fs.h:262
fs::fs_pendingblocks
int64_t fs_pendingblocks
Definition: fs.h:344
ufs2_dinode::di_atime
ufs_time_t di_atime
Definition: ufs.h:112
NDADDR
#define NDADDR
Definition: ufs.h:101
NXADDR
#define NXADDR
Definition: ufs.h:100
csum_total::cs_nbfree
int64_t cs_nbfree
Definition: fs.h:250
ufs1_dinode::di_gid
uint32_t di_gid
Definition: ufs.h:149
fs::fs_avgfpdir
u_int32_t fs_avgfpdir
Definition: fs.h:348
fs::fs_bmask
int32_t fs_bmask
Definition: fs.h:281
fs::fs_spare5
int32_t fs_spare5[2]
Definition: fs.h:363
u_int64_t
__uint64_t u_int64_t
Definition: types.h:54
ufs_initialize
int ufs_initialize()
fs::fs_bshift
int32_t fs_bshift
Definition: fs.h:283
fs::fs_dblkno
int32_t fs_dblkno
Definition: fs.h:266
fs::fs_avgfilesize
u_int32_t fs_avgfilesize
Definition: fs.h:347
csum_total
Definition: fs.h:248
csum_total::cs_spare
int64_t cs_spare[3]
Definition: fs.h:254
fs::fs_swuid
u_int64_t fs_swuid
Definition: fs.h:323
fs::fs_sparecon32
int32_t fs_sparecon32[23]
Definition: fs.h:352
fs::fs_old_rps
int32_t fs_old_rps
Definition: fs.h:279
fs::fs_sbsize
int32_t fs_sbsize
Definition: fs.h:291
fs::fs_maxcluster
int32_t * fs_maxcluster
Definition: fs.h:330
ufs2_dinode::di_spare
int64_t di_spare[3]
Definition: ufs.h:127
MAXVOLLEN
#define MAXVOLLEN
Definition: ufs.h:50
fs::fs_maxbsize
int32_t fs_maxbsize
Definition: fs.h:333
csum::cs_ndir
int32_t cs_ndir
Definition: fs.h:243
types.h
fs::fs_old_npsect
int32_t fs_old_npsect
Definition: fs.h:299
fs::fs_old_nrpos
int32_t fs_old_nrpos
Definition: fs.h:362
ufs1_dinode::di_atime
int32_t di_atime
Definition: ufs.h:137
ufs_time_t
int64_t ufs_time_t
Definition: ufs.h:89
csum_total::cs_nifree
int64_t cs_nifree
Definition: fs.h:251
MAXMNTLEN
#define MAXMNTLEN
Definition: ufs.h:49
fs::fs_fsbtodb
int32_t fs_fsbtodb
Definition: fs.h:290
fs::fs_cssize
int32_t fs_cssize
Definition: fs.h:305
fs::fs_inopb
u_int32_t fs_inopb
Definition: fs.h:295
fs::fs_old_dsize
int32_t fs_old_dsize
Definition: fs.h:271
fs::fs_old_nsect
int32_t fs_old_nsect
Definition: fs.h:308
ufs2_dinode::di_ctime
ufs_time_t di_ctime
Definition: ufs.h:114
fs::fs_old_size
int32_t fs_old_size
Definition: fs.h:270
fs::fs_maxfilesize
u_int64_t fs_maxfilesize
Definition: fs.h:357
fs
Definition: fs.h:260
fs::fs_spare1
int32_t fs_spare1[2]
Definition: fs.h:292
u_int16_t
__uint16_t u_int16_t
Definition: types.h:52
__uint16_t
unsigned short __uint16_t
Definition: _types.h:36
fs::fs_fsize
int32_t fs_fsize
Definition: fs.h:274
fs::fs_contigdirs
u_int8_t * fs_contigdirs
Definition: fs.h:328
ufs2_dinode::di_gen
int32_t di_gen
Definition: ufs.h:120
csum_total::cs_ndir
int64_t cs_ndir
Definition: fs.h:249
fs::fs_clean
int8_t fs_clean
Definition: fs.h:318
ufs2_dinode::di_extsize
int32_t di_extsize
Definition: ufs.h:123
fs::fs_id
int32_t fs_id[2]
Definition: fs.h:302
csum::cs_nifree
int32_t cs_nifree
Definition: fs.h:245
dirent::d_reclen
__uint16_t d_reclen
Definition: ufs.h:94
fs::fs_sparecon64
int64_t fs_sparecon64[14]
Definition: fs.h:337
int8_t
__int8_t int8_t
Definition: types.h:98
ufs1_dinode::di_u
union ufs1_dinode::@21 di_u
ufs2_dinode::di_flags
uint32_t di_flags
Definition: ufs.h:122
fs::fs_fmod
int8_t fs_fmod
Definition: fs.h:317
fs::fs_fragshift
int32_t fs_fragshift
Definition: fs.h:289
dirent
Definition: ufs.h:92
u_int8_t
__uint8_t u_int8_t
Definition: types.h:51
dirent::d_name
char d_name[255+1]
Definition: ufs.h:97
fs::fs_flags
int32_t fs_flags
Definition: fs.h:353
fs::fs_firstfield
int32_t fs_firstfield
Definition: fs.h:261
fs::fs_old_time
int32_t fs_old_time
Definition: fs.h:269
fs::fs_maxbpg
int32_t fs_maxbpg
Definition: fs.h:287
FSMAXSNAP
#define FSMAXSNAP
Definition: ufs.h:52
ufs2_dinode::di_mtimensec
int32_t di_mtimensec
Definition: ufs.h:116
fs::fs_old_spc
int32_t fs_old_spc
Definition: fs.h:309
fs::fs_ronly
int8_t fs_ronly
Definition: fs.h:319
ufs2_dinode::di_db
ufs2_daddr_t di_db[12]
Definition: ufs.h:125
ufs_lbn_t
int64_t ufs_lbn_t
Definition: ufs.h:88
ufs2_dinode::di_blksize
uint32_t di_blksize
Definition: ufs.h:109
ufs_init
int ufs_init()
Definition: ufs.c:313
ufs2_dinode::di_blocks
u_int64_t di_blocks
Definition: ufs.h:111
csum_total::cs_numclusters
int64_t cs_numclusters
Definition: fs.h:253
csum::cs_nffree
int32_t cs_nffree
Definition: fs.h:246
fs::fs_volname
u_char fs_volname[32]
Definition: fs.h:322
fs::fs_fshift
int32_t fs_fshift
Definition: fs.h:284
fs::fs_save_cgsize
int32_t fs_save_cgsize
Definition: fs.h:349
uint32_t
__uint32_t uint32_t
Definition: types.h:46
int32_t
__int32_t int32_t
Definition: types.h:108
fs::fs_bsize
int32_t fs_bsize
Definition: fs.h:273
fs::fs_old_cstotal
struct csum fs_old_cstotal
Definition: fs.h:315
fs::fs_old_nspf
int32_t fs_old_nspf
Definition: fs.h:296
fs::fs_ipg
u_int32_t fs_ipg
Definition: fs.h:312
ufs2_dinode::di_nlink
int16_t di_nlink
Definition: ufs.h:106
fs::fs_pad
int32_t fs_pad
Definition: fs.h:324
fs::fs_size
int64_t fs_size
Definition: fs.h:341
fs::fs_snapinum
uint32_t fs_snapinum[20]
Definition: fs.h:346
ufs1_dinode::di_blocks
int32_t di_blocks
Definition: ufs.h:146
fs::fs_active
u_int * fs_active
Definition: fs.h:331
int64_t
__int64_t int64_t
Definition: types.h:113
fs::fs_old_cpc
int32_t fs_old_cpc
Definition: fs.h:332
fs::fs_csp
struct csum * fs_csp
Definition: fs.h:329
ufs1_dinode::di_atimensec
int32_t di_atimensec
Definition: ufs.h:138
ufs1_dinode::oldids
u_int16_t oldids[2]
Definition: ufs.h:134
fs::fs_ncg
u_int32_t fs_ncg
Definition: fs.h:272
fs::fs_qbmask
int64_t fs_qbmask
Definition: fs.h:358
device.h
ufs2_dinode::di_mode
u_int16_t di_mode
Definition: ufs.h:105
fs::fs_fsmnt
u_char fs_fsmnt[468]
Definition: fs.h:321
fs::fs_frag
int32_t fs_frag
Definition: fs.h:275
fs::fs_iblkno
int32_t fs_iblkno
Definition: fs.h:265
ufs1_dinode::di_mtimensec
int32_t di_mtimensec
Definition: ufs.h:140
NIADDR
#define NIADDR
Definition: ufs.h:102
fs::fs_old_cpg
int32_t fs_old_cpg
Definition: fs.h:311
ufs2_dinode::di_birthtime
ufs_time_t di_birthtime
Definition: ufs.h:115
fs::fs_sblockloc
int64_t fs_sblockloc
Definition: fs.h:338
dirent::d_fileno
__uint32_t d_fileno
Definition: ufs.h:93
fs::fs_qfmask
int64_t fs_qfmask
Definition: fs.h:359
ufs1_dinode
Definition: ufs.h:130
ufs1_dinode::di_ctimensec
int32_t di_ctimensec
Definition: ufs.h:142
ufs2_dinode
Definition: ufs.h:104
fs::fs_maxcontig
int32_t fs_maxcontig
Definition: fs.h:286
ufs1_dinode::di_ib
ufs1_daddr_t di_ib[3]
Definition: ufs.h:144
NOCSPTRS
#define NOCSPTRS
Definition: ufs.h:51
ufs1_dinode::di_db
ufs1_daddr_t di_db[12]
Definition: ufs.h:143
ufs1_dinode::di_mtime
int32_t di_mtime
Definition: ufs.h:139
ufs1_dinode::di_gen
int32_t di_gen
Definition: ufs.h:147
fs::fs_old_cgmask
int32_t fs_old_cgmask
Definition: fs.h:268
fs::fs_ocsp
void * fs_ocsp[((128/sizeof(void *)) - 4)]
Definition: fs.h:327
ufs2_dinode::di_gid
uint32_t di_gid
Definition: ufs.h:108
fs::fs_old_flags
int8_t fs_old_flags
Definition: fs.h:320
fs::fs_state
int32_t fs_state
Definition: fs.h:360
fs::fs_spare2
int32_t fs_spare2
Definition: fs.h:307
fs::fs_fmask
int32_t fs_fmask
Definition: fs.h:282
csum_total::cs_nffree
int64_t cs_nffree
Definition: fs.h:252
ufs1_dinode::di_size
u_int64_t di_size
Definition: ufs.h:136
u_int
unsigned int u_int
Definition: types.h:72
fs::fs_minfree
int32_t fs_minfree
Definition: fs.h:277
fs::fs_dsize
int64_t fs_dsize
Definition: fs.h:342
fs::fs_csaddr
ufs2_daddr_t fs_csaddr
Definition: fs.h:343
ufs2_dinode::di_ctimensec
int32_t di_ctimensec
Definition: ufs.h:118
u_char
unsigned char u_char
Definition: types.h:70
dirent::d_type
__uint8_t d_type
Definition: ufs.h:95
ufs2_dinode::di_kernflags
uint32_t di_kernflags
Definition: ufs.h:121
ufs2_dinode::di_uid
uint32_t di_uid
Definition: ufs.h:107
fs::fs_time
ufs_time_t fs_time
Definition: fs.h:340
ufs2_dinode::di_birthnsec
int32_t di_birthnsec
Definition: ufs.h:119
ufs2_dinode::di_extb
ufs2_daddr_t di_extb[2]
Definition: ufs.h:124
ufs2_dinode::di_atimensec
int32_t di_atimensec
Definition: ufs.h:117
fs::fs_old_csaddr
int32_t fs_old_csaddr
Definition: fs.h:304
csum::cs_nbfree
int32_t cs_nbfree
Definition: fs.h:244
ufs1_dinode::di_uid
uint32_t di_uid
Definition: ufs.h:148
fs::fs_old_trackskew
int32_t fs_old_trackskew
Definition: fs.h:301
ufs2_dinode::di_ib
ufs2_daddr_t di_ib[3]
Definition: ufs.h:126
ufs2_daddr_t
int64_t ufs2_daddr_t
Definition: ufs.h:87