Deleted Added
full compact
fs.h (74548) fs.h (75377)
1/*
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)fs.h 8.13 (Berkeley) 3/21/95
1/*
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)fs.h 8.13 (Berkeley) 3/21/95
34 * $FreeBSD: head/sys/ufs/ffs/fs.h 74548 2001-03-21 04:09:01Z mckusick $
34 * $FreeBSD: head/sys/ufs/ffs/fs.h 75377 2001-04-10 08:38:59Z mckusick $
35 */
36
37#ifndef _UFS_FFS_FS_H_
38#define _UFS_FFS_FS_H_
39
40/*
41 * Each disk drive contains some number of file systems.
42 * A file system consists of a number of cylinder groups.

--- 60 unchanged lines hidden (view full) ---

103 * in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in
104 * the super block for this name.
105 */
106#define MAXMNTLEN 512
107
108/*
109 * There is a 128-byte region in the superblock reserved for in-core
110 * pointers to summary information. Originally this included an array
35 */
36
37#ifndef _UFS_FFS_FS_H_
38#define _UFS_FFS_FS_H_
39
40/*
41 * Each disk drive contains some number of file systems.
42 * A file system consists of a number of cylinder groups.

--- 60 unchanged lines hidden (view full) ---

103 * in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in
104 * the super block for this name.
105 */
106#define MAXMNTLEN 512
107
108/*
109 * There is a 128-byte region in the superblock reserved for in-core
110 * pointers to summary information. Originally this included an array
111 * of pointers to blocks of struct csum; now there are just two
111 * of pointers to blocks of struct csum; now there are just three
112 * pointers and the remaining space is padded with fs_ocsp[].
113 *
114 * NOCSPTRS determines the size of this padding. One pointer (fs_csp)
115 * is taken away to point to a contiguous array of struct csum for
116 * all cylinder groups; a second (fs_maxcluster) points to an array
112 * pointers and the remaining space is padded with fs_ocsp[].
113 *
114 * NOCSPTRS determines the size of this padding. One pointer (fs_csp)
115 * is taken away to point to a contiguous array of struct csum for
116 * all cylinder groups; a second (fs_maxcluster) points to an array
117 * of cluster sizes that is computed as cylinder groups are inspected.
117 * of cluster sizes that is computed as cylinder groups are inspected,
118 * and the third points to an array that tracks the creation of new
119 * directories.
118 */
120 */
119#define NOCSPTRS ((128 / sizeof(void *)) - 2)
121#define NOCSPTRS ((128 / sizeof(void *)) - 3)
120
121/*
122 * A summary of contiguous blocks of various sizes is maintained
123 * in each cylinder group. Normally this is set by the initial
124 * value of fs_maxcontig. To conserve space, a maximum summary size
125 * is set by FS_MAXCONTIG.
126 */
127#define FS_MAXCONTIG 16

--- 9 unchanged lines hidden (view full) ---

137 * performance, 10% is a better choice. hence we use 10% as our
138 * default value. With 10% free space, fragmentation is not a
139 * problem, so we choose to optimize for time.
140 */
141#define MINFREE 8
142#define DEFAULTOPT FS_OPTTIME
143
144/*
122
123/*
124 * A summary of contiguous blocks of various sizes is maintained
125 * in each cylinder group. Normally this is set by the initial
126 * value of fs_maxcontig. To conserve space, a maximum summary size
127 * is set by FS_MAXCONTIG.
128 */
129#define FS_MAXCONTIG 16

--- 9 unchanged lines hidden (view full) ---

139 * performance, 10% is a better choice. hence we use 10% as our
140 * default value. With 10% free space, fragmentation is not a
141 * problem, so we choose to optimize for time.
142 */
143#define MINFREE 8
144#define DEFAULTOPT FS_OPTTIME
145
146/*
147 * Grigoriy Orlov <gluk@ptci.ru> has done some extensive work to fine
148 * tune the layout preferences for directories within a filesystem.
149 * His algorithm can be tuned by adjusting the following parameters
150 * which tell the system the average file size and the average number
151 * of files per directory. These defaults are well selected for typical
152 * filesystems, but may need to be tuned for odd cases like filesystems
153 * being used for sqiud caches or news spools.
154 */
155#define AVFILESIZ 16384 /* expected average file size */
156#define AFPDIR 64 /* expected number of files per directory */
157
158/*
145 * The maximum number of snapshot nodes that can be associated
146 * with each filesystem. This limit affects only the number of
147 * snapshot files that can be recorded within the superblock so
148 * that they can be found when the filesystem is mounted. However,
149 * maintaining too many will slow the filesystem performance, so
150 * having this limit is a good idea.
151 */
152#define FSMAXSNAP 20

--- 115 unchanged lines hidden (view full) ---

268 int8_t fs_fmod; /* super block modified flag */
269 int8_t fs_clean; /* file system is clean flag */
270 int8_t fs_ronly; /* mounted read-only flag */
271 int8_t fs_flags; /* see FS_ flags below */
272 u_char fs_fsmnt[MAXMNTLEN]; /* name mounted on */
273/* these fields retain the current block allocation info */
274 int32_t fs_cgrotor; /* last cg searched */
275 void *fs_ocsp[NOCSPTRS]; /* padding; was list of fs_cs buffers */
159 * The maximum number of snapshot nodes that can be associated
160 * with each filesystem. This limit affects only the number of
161 * snapshot files that can be recorded within the superblock so
162 * that they can be found when the filesystem is mounted. However,
163 * maintaining too many will slow the filesystem performance, so
164 * having this limit is a good idea.
165 */
166#define FSMAXSNAP 20

--- 115 unchanged lines hidden (view full) ---

282 int8_t fs_fmod; /* super block modified flag */
283 int8_t fs_clean; /* file system is clean flag */
284 int8_t fs_ronly; /* mounted read-only flag */
285 int8_t fs_flags; /* see FS_ flags below */
286 u_char fs_fsmnt[MAXMNTLEN]; /* name mounted on */
287/* these fields retain the current block allocation info */
288 int32_t fs_cgrotor; /* last cg searched */
289 void *fs_ocsp[NOCSPTRS]; /* padding; was list of fs_cs buffers */
290 u_int8_t *fs_contigdirs; /* # of contiguously allocated dirs */
276 struct csum *fs_csp; /* cg summary info buffer for fs_cs */
277 int32_t *fs_maxcluster; /* max cluster in each cyl group */
278 int32_t fs_cpc; /* cyl per cycle in postbl */
279 int16_t fs_opostbl[16][8]; /* old rotation block list head */
280 int32_t fs_snapinum[FSMAXSNAP];/* list of snapshot inode numbers */
291 struct csum *fs_csp; /* cg summary info buffer for fs_cs */
292 int32_t *fs_maxcluster; /* max cluster in each cyl group */
293 int32_t fs_cpc; /* cyl per cycle in postbl */
294 int16_t fs_opostbl[16][8]; /* old rotation block list head */
295 int32_t fs_snapinum[FSMAXSNAP];/* list of snapshot inode numbers */
281 int32_t fs_sparecon[30]; /* reserved for future constants */
296 int32_t fs_avgfilesize; /* expected average file size */
297 int32_t fs_avgfpdir; /* expected # of files per directory */
298 int32_t fs_sparecon[28]; /* reserved for future constants */
282 int32_t fs_contigsumsize; /* size of cluster summary array */
283 int32_t fs_maxsymlinklen; /* max length of an internal symlink */
284 int32_t fs_inodefmt; /* format of on-disk inodes */
285 u_int64_t fs_maxfilesize; /* maximum representable file size */
286 int64_t fs_qbmask; /* ~fs_bmask for use with 64-bit size */
287 int64_t fs_qfmask; /* ~fs_fmask for use with 64-bit size */
288 int32_t fs_state; /* validate fs_clean field */
289 int32_t fs_postblformat; /* format of positional layout tables */

--- 280 unchanged lines hidden ---
299 int32_t fs_contigsumsize; /* size of cluster summary array */
300 int32_t fs_maxsymlinklen; /* max length of an internal symlink */
301 int32_t fs_inodefmt; /* format of on-disk inodes */
302 u_int64_t fs_maxfilesize; /* maximum representable file size */
303 int64_t fs_qbmask; /* ~fs_bmask for use with 64-bit size */
304 int64_t fs_qfmask; /* ~fs_fmask for use with 64-bit size */
305 int32_t fs_state; /* validate fs_clean field */
306 int32_t fs_postblformat; /* format of positional layout tables */

--- 280 unchanged lines hidden ---