151147Sbostic /*- 261524Sbostic * Copyright (c) 1991, 1993 361524Sbostic * The Regents of the University of California. All rights reserved. 451147Sbostic * 551147Sbostic * %sccs.include.redist.c% 651147Sbostic * 7*69671Smargo * @(#)config.h 8.3 (Berkeley) 05/24/95 851147Sbostic */ 951147Sbostic 1051147Sbostic /* 1167053Smckusick * The first boot and super blocks are given in absolute disk addresses. 1267053Smckusick * The byte-offset forms are preferred, as they don't imply a sector size. 1367053Smckusick */ 1467053Smckusick #define BBSIZE 8192 1567053Smckusick #define SBSIZE 8192 1667053Smckusick 1767053Smckusick /* 1851147Sbostic * The following two constants set the default block and fragment sizes. 1951147Sbostic * Both constants must be a power of 2 and meet the following constraints: 2051147Sbostic * MINBSIZE <= DESBLKSIZE <= MAXBSIZE 2151147Sbostic * sectorsize <= DESFRAGSIZE <= DESBLKSIZE 2251147Sbostic * DESBLKSIZE / DESFRAGSIZE <= 8 2351147Sbostic */ 2451147Sbostic #define DFL_FRAGSIZE 1024 2551147Sbostic #define DFL_BLKSIZE 8192 2651147Sbostic 2751147Sbostic /* 2851147Sbostic * Cylinder groups may have up to many cylinders. The actual 2951147Sbostic * number used depends upon how much information can be stored 3051147Sbostic * on a single cylinder. The default is to use 16 cylinders 3151147Sbostic * per group. 3251147Sbostic */ 3351147Sbostic #define DESCPG 16 /* desired fs_cpg */ 3451147Sbostic 3551147Sbostic /* 3651147Sbostic * MINFREE gives the minimum acceptable percentage of file system 3751147Sbostic * blocks which may be free. If the freelist drops below this level 3851147Sbostic * only the superuser may continue to allocate blocks. This may 3951147Sbostic * be set to 0 if no reserve of free blocks is deemed necessary, 4051147Sbostic * however throughput drops by fifty percent if the file system 4151147Sbostic * is run at between 90% and 100% full; thus the default value of 4251147Sbostic * fs_minfree is 10%. With 10% free space, fragmentation is not a 4351147Sbostic * problem, so we choose to optimize for time. 4451147Sbostic */ 4551147Sbostic #define MINFREE 10 4651147Sbostic #define DEFAULTOPT FS_OPTTIME 4751147Sbostic 4851147Sbostic /* 4967053Smckusick * Preference for optimization. 5067053Smckusick */ 5167053Smckusick #define FS_OPTTIME 0 /* minimize allocation time */ 5267053Smckusick #define FS_OPTSPACE 1 /* minimize disk fragmentation */ 5367053Smckusick 5467053Smckusick 5567053Smckusick /* 5651147Sbostic * ROTDELAY gives the minimum number of milliseconds to initiate 5751147Sbostic * another disk transfer on the same cylinder. It is used in 5851147Sbostic * determining the rotationally optimal layout for disk blocks 5951147Sbostic * within a file; the default of fs_rotdelay is 4ms. 6051147Sbostic */ 6151147Sbostic #define ROTDELAY 4 6251147Sbostic 6351147Sbostic /* 6451147Sbostic * MAXCONTIG sets the default for the maximum number of blocks 6551147Sbostic * that may be allocated sequentially. Since UNIX drivers are 6651147Sbostic * not capable of scheduling multi-block transfers, this defaults 6751147Sbostic * to 1 (ie no contiguous blocks are allocated). 6851147Sbostic */ 6951147Sbostic #define MAXCONTIG 1 7051147Sbostic 7151147Sbostic /* 7251147Sbostic * MAXBLKPG determines the maximum number of data blocks which are 7351147Sbostic * placed in a single cylinder group. The default is one indirect 7451147Sbostic * block worth of data blocks. 7551147Sbostic */ 7651147Sbostic #define MAXBLKPG(bsize) ((bsize) / sizeof(daddr_t)) 7751147Sbostic 7851147Sbostic /* 7951147Sbostic * Each file system has a number of inodes statically allocated. 8051147Sbostic * We allocate one inode slot per NFPI fragments, expecting this 8151147Sbostic * to be far more than we will ever need. 8251147Sbostic */ 8351147Sbostic #define NFPI 4 8451147Sbostic 8551147Sbostic /* 8651147Sbostic * For each cylinder we keep track of the availability of blocks at different 8751147Sbostic * rotational positions, so that we can lay out the data to be picked 8851147Sbostic * up with minimum rotational latency. NRPOS is the default number of 8951147Sbostic * rotational positions that we distinguish. With NRPOS of 8 the resolution 9051147Sbostic * of our summary information is 2ms for a typical 3600 rpm drive. 9151147Sbostic */ 9251147Sbostic #define NRPOS 8 /* number distinct rotational positions */ 9351147Sbostic 9451147Sbostic /* 9551147Sbostic * The following constants set the default block and segment size for a log 9651147Sbostic * structured file system. Both must be powers of two and the segment size 9751147Sbostic * must be a multiple of the block size. We also set minimum block and segment 9851147Sbostic * sizes. 9951147Sbostic */ 10056862Smargo #define LFS_MINSEGSIZE (64*1024) 10151147Sbostic #define DFL_LFSSEG (1024 * 1024) 10251147Sbostic #define DFL_LFSSEG_SHIFT 20 10351863Sbostic #define DFL_LFSSEG_MASK 0xFFFFF 10451147Sbostic 10551147Sbostic #define LFS_MINBLOCKSIZE 1024 10651147Sbostic #define DFL_LFSBLOCK 4096 10751147Sbostic #define DFL_LFSBLOCK_SHIFT 12 10854262Sbostic #define DFL_LFSBLOCK_MASK 0xFFF 109*69671Smargo 110*69671Smargo #define DFL_LFSFRAG 4096 111*69671Smargo #define DFL_LFS_FFMASK DFL_LFSBLOCK_MASK 112*69671Smargo #define DFL_LFS_FFSHIFT DFL_LFSBLOCK_SHIFT 113*69671Smargo #define DFL_LFS_FBMASK 0 114*69671Smargo #define DFL_LFS_FBSHIFT 0 115