1 /*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)config.h 8.3 (Berkeley) 05/24/95 8 */ 9 10 /* 11 * The first boot and super blocks are given in absolute disk addresses. 12 * The byte-offset forms are preferred, as they don't imply a sector size. 13 */ 14 #define BBSIZE 8192 15 #define SBSIZE 8192 16 17 /* 18 * The following two constants set the default block and fragment sizes. 19 * Both constants must be a power of 2 and meet the following constraints: 20 * MINBSIZE <= DESBLKSIZE <= MAXBSIZE 21 * sectorsize <= DESFRAGSIZE <= DESBLKSIZE 22 * DESBLKSIZE / DESFRAGSIZE <= 8 23 */ 24 #define DFL_FRAGSIZE 1024 25 #define DFL_BLKSIZE 8192 26 27 /* 28 * Cylinder groups may have up to many cylinders. The actual 29 * number used depends upon how much information can be stored 30 * on a single cylinder. The default is to use 16 cylinders 31 * per group. 32 */ 33 #define DESCPG 16 /* desired fs_cpg */ 34 35 /* 36 * MINFREE gives the minimum acceptable percentage of file system 37 * blocks which may be free. If the freelist drops below this level 38 * only the superuser may continue to allocate blocks. This may 39 * be set to 0 if no reserve of free blocks is deemed necessary, 40 * however throughput drops by fifty percent if the file system 41 * is run at between 90% and 100% full; thus the default value of 42 * fs_minfree is 10%. With 10% free space, fragmentation is not a 43 * problem, so we choose to optimize for time. 44 */ 45 #define MINFREE 10 46 #define DEFAULTOPT FS_OPTTIME 47 48 /* 49 * Preference for optimization. 50 */ 51 #define FS_OPTTIME 0 /* minimize allocation time */ 52 #define FS_OPTSPACE 1 /* minimize disk fragmentation */ 53 54 55 /* 56 * ROTDELAY gives the minimum number of milliseconds to initiate 57 * another disk transfer on the same cylinder. It is used in 58 * determining the rotationally optimal layout for disk blocks 59 * within a file; the default of fs_rotdelay is 4ms. 60 */ 61 #define ROTDELAY 4 62 63 /* 64 * MAXCONTIG sets the default for the maximum number of blocks 65 * that may be allocated sequentially. Since UNIX drivers are 66 * not capable of scheduling multi-block transfers, this defaults 67 * to 1 (ie no contiguous blocks are allocated). 68 */ 69 #define MAXCONTIG 1 70 71 /* 72 * MAXBLKPG determines the maximum number of data blocks which are 73 * placed in a single cylinder group. The default is one indirect 74 * block worth of data blocks. 75 */ 76 #define MAXBLKPG(bsize) ((bsize) / sizeof(daddr_t)) 77 78 /* 79 * Each file system has a number of inodes statically allocated. 80 * We allocate one inode slot per NFPI fragments, expecting this 81 * to be far more than we will ever need. 82 */ 83 #define NFPI 4 84 85 /* 86 * For each cylinder we keep track of the availability of blocks at different 87 * rotational positions, so that we can lay out the data to be picked 88 * up with minimum rotational latency. NRPOS is the default number of 89 * rotational positions that we distinguish. With NRPOS of 8 the resolution 90 * of our summary information is 2ms for a typical 3600 rpm drive. 91 */ 92 #define NRPOS 8 /* number distinct rotational positions */ 93 94 /* 95 * The following constants set the default block and segment size for a log 96 * structured file system. Both must be powers of two and the segment size 97 * must be a multiple of the block size. We also set minimum block and segment 98 * sizes. 99 */ 100 #define LFS_MINSEGSIZE (64*1024) 101 #define DFL_LFSSEG (1024 * 1024) 102 #define DFL_LFSSEG_SHIFT 20 103 #define DFL_LFSSEG_MASK 0xFFFFF 104 105 #define LFS_MINBLOCKSIZE 1024 106 #define DFL_LFSBLOCK 4096 107 #define DFL_LFSBLOCK_SHIFT 12 108 #define DFL_LFSBLOCK_MASK 0xFFF 109 110 #define DFL_LFSFRAG 4096 111 #define DFL_LFS_FFMASK DFL_LFSBLOCK_MASK 112 #define DFL_LFS_FFSHIFT DFL_LFSBLOCK_SHIFT 113 #define DFL_LFS_FBMASK 0 114 #define DFL_LFS_FBSHIFT 0 115