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