|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: f
Length: 15529 (0x3ca9)
Names: »fs.5«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./usr/man/cat5/fs.5«
0x0000…0020 0a 0a 0a 5f 08 4f 5f 08 6e 5f 08 6c 5f 08 69 5f 08 6e 5f 08 65 20 5f 08 4d 5f 08 61 5f 08 6e 5f ┆ _ O_ n_ l_ i_ n_ e _ M_ a_ n_┆
0x0020…0040 08 75 5f 08 61 5f 08 6c 20 20 20 20 20 20 20 20 20 20 20 20 20 46 69 6c 65 20 46 6f 72 6d 61 74 ┆ u_ a_ l File Format┆
0x0040…0060 73 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 73 28 35 29 0a 0a 0a 0a ┆s fs(5) ┆
0x0060…0080 4e 08 4e 08 4e 08 4e 41 08 41 08 41 08 41 4d 08 4d 08 4d 08 4d 45 08 45 08 45 08 45 0a 20 20 20 ┆N N N NA A A AM M M ME E E E ┆
0x0080…00a0 20 20 66 73 2c 20 69 6e 6f 64 65 20 2d 20 66 6f 72 6d 61 74 20 6f 66 20 66 69 6c 65 20 73 79 73 ┆ fs, inode - format of file sys┆
0x00a0…00c0 74 65 6d 20 76 6f 6c 75 6d 65 0a 0a 53 08 53 08 53 08 53 59 08 59 08 59 08 59 4e 08 4e 08 4e 08 ┆tem volume S S S SY Y Y YN N N ┆
0x00c0…00e0 4e 54 08 54 08 54 08 54 41 08 41 08 41 08 41 58 08 58 08 58 08 58 0a 20 20 20 20 20 23 08 23 08 ┆NT T T TA A A AX X X X # # ┆
0x00e0…0100 23 08 23 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 63 08 63 08 63 08 63 6c 08 6c 08 6c 08 6c 75 ┆# #i i i in n n nc c c cl l l lu┆
0x0100…0120 08 75 08 75 08 75 64 08 64 08 64 08 64 65 08 65 08 65 08 65 20 3c 08 3c 08 3c 08 3c 73 08 73 08 ┆ u u ud d d de e e e < < < <s s ┆
0x0120…0140 73 08 73 79 08 79 08 79 08 79 73 08 73 08 73 08 73 2f 08 2f 08 2f 08 2f 74 08 74 08 74 08 74 79 ┆s sy y y ys s s s/ / / /t t t ty┆
0x0140…0160 08 79 08 79 08 79 70 08 70 08 70 08 70 65 08 65 08 65 08 65 73 08 73 08 73 08 73 2e 08 2e 08 2e ┆ y y yp p p pe e e es s s s. . .┆
0x0160…0180 08 2e 68 08 68 08 68 08 68 3e 08 3e 08 3e 08 3e 0a 20 20 20 20 20 23 08 23 08 23 08 23 69 08 69 ┆ .h h h h> > > > # # # #i i┆
0x0180…01a0 08 69 08 69 6e 08 6e 08 6e 08 6e 63 08 63 08 63 08 63 6c 08 6c 08 6c 08 6c 75 08 75 08 75 08 75 ┆ i in n n nc c c cl l l lu u u u┆
0x01a0…01c0 64 08 64 08 64 08 64 65 08 65 08 65 08 65 20 3c 08 3c 08 3c 08 3c 73 08 73 08 73 08 73 79 08 79 ┆d d d de e e e < < < <s s s sy y┆
0x01c0…01e0 08 79 08 79 73 08 73 08 73 08 73 2f 08 2f 08 2f 08 2f 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e ┆ y ys s s s/ / / /i i i in n n n┆
0x01e0…0200 6f 08 6f 08 6f 08 6f 64 08 64 08 64 08 64 65 08 65 08 65 08 65 2e 08 2e 08 2e 08 2e 68 08 68 08 ┆o o o od d d de e e e. . . .h h ┆
0x0200…0220 68 08 68 3e 08 3e 08 3e 08 3e 0a 20 20 20 20 20 23 08 23 08 23 08 23 69 08 69 08 69 08 69 6e 08 ┆h h> > > > # # # #i i i in ┆
0x0220…0240 6e 08 6e 08 6e 63 08 63 08 63 08 63 6c 08 6c 08 6c 08 6c 75 08 75 08 75 08 75 64 08 64 08 64 08 ┆n n nc c c cl l l lu u u ud d d ┆
0x0240…0260 64 65 08 65 08 65 08 65 20 3c 08 3c 08 3c 08 3c 73 08 73 08 73 08 73 79 08 79 08 79 08 79 73 08 ┆de e e e < < < <s s s sy y y ys ┆
0x0260…0280 73 08 73 08 73 2f 08 2f 08 2f 08 2f 66 08 66 08 66 08 66 78 08 78 08 78 08 78 2e 08 2e 08 2e 08 ┆s s s/ / / /f f f fx x x x. . . ┆
0x0280…02a0 2e 68 08 68 08 68 08 68 3e 08 3e 08 3e 08 3e 0a 0a 44 08 44 08 44 08 44 45 08 45 08 45 08 45 53 ┆.h h h h> > > > D D D DE E E ES┆
0x02a0…02c0 08 53 08 53 08 53 43 08 43 08 43 08 43 52 08 52 08 52 08 52 49 08 49 08 49 08 49 50 08 50 08 50 ┆ S S SC C C CR R R RI I I IP P P┆
0x02c0…02e0 08 50 54 08 54 08 54 08 54 49 08 49 08 49 08 49 4f 08 4f 08 4f 08 4f 4e 08 4e 08 4e 08 4e 0a 20 ┆ PT T T TI I I IO O O ON N N N ┆
0x02e0…0300 20 20 20 20 45 76 65 72 79 20 66 69 6c 65 20 73 79 73 74 65 6d 20 73 74 6f 72 61 67 65 20 76 6f ┆ Every file system storage vo┆
0x0300…0320 6c 75 6d 65 20 68 61 73 20 61 20 63 6f 6d 6d 6f 6e 20 66 6f 72 6d 61 74 20 66 6f 72 0a 20 20 20 ┆lume has a common format for ┆
0x0320…0340 20 20 63 65 72 74 61 69 6e 20 76 69 74 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 20 20 45 76 ┆ certain vital information. Ev┆
0x0340…0360 65 72 79 20 73 75 63 68 20 76 6f 6c 75 6d 65 20 69 73 20 64 69 76 69 64 65 64 0a 20 20 20 20 20 ┆ery such volume is divided ┆
0x0360…0380 69 6e 74 6f 20 61 20 63 65 72 74 61 69 6e 20 6e 75 6d 62 65 72 20 6f 66 20 62 6c 6f 63 6b 73 2e ┆into a certain number of blocks.┆
0x0380…03a0 20 20 54 68 65 20 62 6c 6f 63 6b 20 73 69 7a 65 20 69 73 20 61 20 70 61 72 61 6d 2d 0a 20 20 20 ┆ The block size is a param- ┆
0x03a0…03c0 20 20 65 74 65 72 20 6f 66 20 74 68 65 20 66 69 6c 65 20 73 79 73 74 65 6d 2e 0a 0a 20 20 20 20 ┆ eter of the file system. ┆
0x03c0…03e0 20 54 68 65 20 61 63 74 75 61 6c 20 66 69 6c 65 20 73 79 73 74 65 6d 20 62 65 67 69 6e 73 20 77 ┆ The actual file system begins w┆
0x03e0…0400 69 74 68 20 74 68 65 20 5f 08 73 5f 08 75 5f 08 70 5f 08 65 5f 08 72 20 5f 08 62 5f 08 6c 5f 08 ┆ith the _ s_ u_ p_ e_ r _ b_ l_ ┆
0x0400…0420 6f 5f 08 63 5f 08 6b 2e 20 54 68 65 20 6c 61 79 2d 0a 20 20 20 20 20 6f 75 74 20 6f 66 20 74 68 ┆o_ c_ k. The lay- out of th┆
0x0420…0440 65 20 73 75 70 65 72 20 62 6c 6f 63 6b 20 61 73 20 64 65 66 69 6e 65 64 20 62 79 20 74 68 65 20 ┆e super block as defined by the ┆
0x0440…0460 69 6e 63 6c 75 64 65 20 66 69 6c 65 0a 20 20 20 20 20 3c 5f 08 73 5f 08 79 5f 08 73 2f 5f 08 66 ┆include file <_ s_ y_ s/_ f┆
0x0460…0480 5f 08 78 2e 5f 08 68 3e 20 69 73 3a 0a 0a 20 20 20 20 20 2f 2a 0a 20 20 20 20 20 20 2a 20 20 66 ┆_ x._ h> is: /* * f┆
0x0480…04a0 78 2e 68 20 2d 2d 20 70 72 69 6d 61 72 79 20 66 69 6c 65 20 73 79 73 74 65 6d 20 73 70 61 63 65 ┆x.h -- primary file system space┆
0x04a0…04c0 20 6d 61 6e 61 67 65 6d 65 6e 74 20 73 74 72 75 63 74 75 72 65 73 0a 20 20 20 20 20 20 2a 0a 20 ┆ management structures * ┆
0x04c0…04e0 20 20 20 20 20 2a 20 45 61 63 68 20 6c 6f 67 69 63 61 6c 20 76 6f 6c 75 6d 65 20 63 6f 6e 74 61 ┆ * Each logical volume conta┆
0x04e0…0500 69 6e 73 20 65 78 61 63 74 6c 79 20 6f 6e 65 20 66 69 6c 65 20 73 79 73 74 65 6d 2e 0a 20 20 20 ┆ins exactly one file system. ┆
0x0500…0520 20 20 20 2a 20 41 20 66 69 6c 65 20 73 79 73 74 65 6d 20 63 6f 6e 73 69 73 74 73 20 6f 66 20 61 ┆ * A file system consists of a┆
0x0520…0540 20 6e 75 6d 62 65 72 20 6f 66 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 75 6e 69 74 73 2e 0a 20 20 20 ┆ number of allocation units. ┆
0x0540…0560 20 20 20 2a 20 45 61 63 68 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 75 6e 69 74 20 68 61 73 20 69 6e ┆ * Each allocation unit has in┆
0x0560…0580 6f 64 65 73 20 61 6e 64 20 64 61 74 61 2e 0a 20 20 20 20 20 20 2a 0a 20 20 20 20 20 20 2a 20 41 ┆odes and data. * * A┆
0x0580…05a0 20 66 69 6c 65 20 73 79 73 74 65 6d 20 69 73 20 64 65 73 63 72 69 62 65 64 20 62 79 20 69 74 73 ┆ file system is described by its┆
0x05a0…05c0 20 73 75 70 65 72 2d 62 6c 6f 63 6b 2c 20 77 68 69 63 68 20 69 6e 20 74 75 72 6e 0a 20 20 20 20 ┆ super-block, which in turn ┆
0x05c0…05e0 20 20 2a 20 64 65 73 63 72 69 62 65 73 20 74 68 65 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 75 6e 69 ┆ * describes the allocation uni┆
0x05e0…0600 74 73 2e 20 20 54 68 65 20 73 75 70 65 72 2d 62 6c 6f 63 6b 20 69 73 20 63 72 69 74 69 63 61 6c ┆ts. The super-block is critical┆
0x0600…0620 0a 20 20 20 20 20 20 2a 20 64 61 74 61 20 61 6e 64 20 69 73 20 72 65 70 6c 69 63 61 74 65 64 20 ┆ * data and is replicated ┆
0x0620…0640 69 6e 20 65 61 63 68 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 75 6e 69 74 20 74 6f 20 70 72 6f 74 65 ┆in each allocation unit to prote┆
0x0640…0660 63 74 20 61 67 61 69 6e 73 74 0a 20 20 20 20 20 20 2a 20 63 61 74 61 73 74 72 6f 70 68 69 63 20 ┆ct against * catastrophic ┆
0x0660…0680 6c 6f 73 73 2e 20 20 54 68 69 73 20 69 73 20 64 6f 6e 65 20 61 74 20 6d 6b 66 73 20 74 69 6d 65 ┆loss. This is done at mkfs time┆
0x0680…06a0 20 61 6e 64 20 74 68 65 20 63 72 69 74 69 63 61 6c 0a 20 20 20 20 20 20 2a 20 73 75 70 65 72 2d ┆ and the critical * super-┆
0x06a0…06c0 62 6c 6f 63 6b 20 64 61 74 61 20 64 6f 65 73 20 6e 6f 74 20 63 68 61 6e 67 65 2c 20 73 6f 20 74 ┆block data does not change, so t┆
0x06c0…06e0 68 65 20 63 6f 70 69 65 73 20 6e 65 65 64 20 6e 6f 74 20 62 65 0a 20 20 20 20 20 20 2a 20 72 65 ┆he copies need not be * re┆
0x06e0…0700 66 65 72 65 6e 63 65 64 20 66 75 72 74 68 65 72 20 75 6e 6c 65 73 73 20 64 69 73 61 73 74 65 72 ┆ferenced further unless disaster┆
0x0700…0720 20 73 74 72 69 6b 65 73 2e 0a 20 20 20 20 20 20 2a 0a 20 20 20 20 20 20 2a 20 46 6f 72 20 66 69 ┆ strikes. * * For fi┆
0x0720…0740 6c 65 20 73 79 73 74 65 6d 20 66 78 2c 20 74 68 65 20 6f 66 66 73 65 74 73 20 6f 66 20 74 68 65 ┆le system fx, the offsets of the┆
0x0740…0760 20 76 61 72 69 6f 75 73 20 62 6c 6f 63 6b 73 20 6f 66 20 69 6e 74 65 72 65 73 74 0a 20 20 20 20 ┆ various blocks of interest ┆
0x0760…0780 20 20 2a 20 61 72 65 20 67 69 76 65 6e 20 69 6e 20 74 68 65 20 73 75 70 65 72 20 62 6c 6f 63 6b ┆ * are given in the super block┆
0x0780…07a0 20 61 73 3a 0a 20 20 20 20 20 20 2a 20 20 20 20 20 20 5b 66 78 2d 3e 66 78 5f 73 62 6c 6b 6e 6f ┆ as: * [fx->fx_sblkno┆
0x07a0…07c0 5d 20 20 20 20 20 20 20 20 20 53 75 70 65 72 2d 62 6c 6f 63 6b 0a 20 20 20 20 20 20 2a 20 20 20 ┆] Super-block * ┆
0x07c0…07e0 20 20 20 5b 66 78 2d 3e 66 78 5f 61 75 62 6c 6b 6e 6f 5d 20 20 20 20 20 20 20 20 41 6c 6c 6f 63 ┆ [fx->fx_aublkno] Alloc┆
0x07e0…0800 61 74 69 6f 6e 20 75 6e 69 74 20 62 6c 6f 63 6b 0a 20 20 20 20 20 20 2a 20 20 20 20 20 20 5b 66 ┆ation unit block * [f┆
0x0800…0820 78 2d 3e 66 78 5f 69 62 6c 6b 6e 6f 5d 20 20 20 20 20 20 20 20 20 49 6e 6f 64 65 20 62 6c 6f 63 ┆x->fx_iblkno] Inode bloc┆
0x0820…0840 6b 73 0a 20 20 20 20 20 20 2a 20 20 20 20 20 20 5b 66 78 2d 3e 66 78 5f 64 62 6c 6b 6e 6f 5d 20 ┆ks * [fx->fx_dblkno] ┆
0x0840…0860 20 20 20 20 20 20 20 20 44 61 74 61 20 62 6c 6f 63 6b 73 0a 20 20 20 20 20 20 2a 20 54 68 65 20 ┆ Data blocks * The ┆
0x0860…0880 62 65 67 69 6e 6e 69 6e 67 20 6f 66 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 75 6e 69 74 20 61 75 20 ┆beginning of allocation unit au ┆
0x0880…08a0 69 6e 20 66 78 2c 20 69 73 20 67 69 76 65 6e 20 62 79 0a 20 20 20 20 20 20 2a 20 74 68 65 20 60 ┆in fx, is given by * the `┆
0x08a0…08c0 60 41 55 42 41 53 45 28 66 78 2c 20 61 75 29 27 27 20 6d 61 63 72 6f 2e 0a 20 20 20 20 20 20 2a ┆`AUBASE(fx, au)'' macro. *┆
0x08c0…08e0 2f 0a 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 53 42 53 49 5a 45 20 20 20 20 20 20 20 20 20 20 ┆/ #define SBSIZE ┆
0x08e0…0900 31 30 32 34 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 53 42 4c 4f 43 4b 20 20 20 20 20 20 20 20 ┆1024 #define SBLOCK ┆
0x0900…0920 20 20 28 28 64 61 64 64 72 5f 74 29 28 30 29 29 0a 0a 20 20 20 20 20 2f 2a 0a 20 20 20 20 20 20 ┆ ((daddr_t)(0)) /* ┆
0x0920…0940 2a 20 41 64 64 72 65 73 73 65 73 20 73 74 6f 72 65 64 20 69 6e 20 69 2d 6e 6f 64 65 73 20 61 64 ┆* Addresses stored in i-nodes ad┆
0x0940…0960 64 72 65 73 73 20 65 78 74 65 6e 74 73 2e 20 20 45 78 74 65 6e 74 73 20 61 72 65 20 6d 61 64 65 ┆dress extents. Extents are made┆
0x0960…0980 20 75 70 20 6f 66 0a 20 20 20 20 20 20 2a 20 73 6f 6d 65 20 6e 75 6d 62 65 72 20 6f 66 20 62 6c ┆ up of * some number of bl┆
0x0980…09a0 6f 63 6b 73 20 77 68 69 63 68 20 69 73 20 61 20 70 6f 77 65 72 20 6f 66 20 74 77 6f 2e 20 20 54 ┆ocks which is a power of two. T┆
0x09a0…09c0 68 65 20 62 6c 6f 63 6b 20 73 69 7a 65 20 69 73 0a 20 20 20 20 20 20 2a 20 61 20 70 61 72 61 6d ┆he block size is * a param┆
0x09c0…09e0 65 74 65 72 20 6f 66 20 74 68 65 20 6c 6f 67 69 63 61 6c 20 76 6f 6c 75 6d 65 2e 0a 20 20 20 20 ┆eter of the logical volume. ┆
0x09e0…0a00 20 20 2a 0a 20 20 20 20 20 20 2a 20 54 68 65 20 72 6f 6f 74 20 69 6e 6f 64 65 20 69 73 20 74 68 ┆ * * The root inode is th┆
0x0a00…0a20 65 20 72 6f 6f 74 20 6f 66 20 74 68 65 20 66 69 6c 65 20 73 79 73 74 65 6d 2e 0a 20 20 20 20 20 ┆e root of the file system. ┆
0x0a20…0a40 20 2a 20 49 6e 6f 64 65 20 30 20 63 61 6e 27 74 20 62 65 20 75 73 65 64 20 66 6f 72 20 6e 6f 72 ┆ * Inode 0 can't be used for nor┆
0x0a40…0a60 6d 61 6c 20 70 75 72 70 6f 73 65 73 20 61 6e 64 0a 20 20 20 20 20 20 2a 20 68 69 73 74 6f 72 69 ┆mal purposes and * histori┆
0x0a60…0a80 63 61 6c 6c 79 20 62 61 64 20 62 6c 6f 63 6b 73 20 77 65 72 65 20 6c 69 6e 6b 65 64 20 74 6f 20 ┆cally bad blocks were linked to ┆
0x0a80…0aa0 69 6e 6f 64 65 20 31 2c 0a 20 20 20 20 20 20 2a 20 74 68 75 73 20 74 68 65 20 72 6f 6f 74 20 69 ┆inode 1, * thus the root i┆
0x0aa0…0ac0 6e 6f 64 65 20 69 73 20 32 2e 20 28 69 6e 6f 64 65 20 31 20 69 73 20 6e 6f 20 6c 6f 6e 67 65 72 ┆node is 2. (inode 1 is no longer┆
0x0ac0…0ae0 20 75 73 65 64 20 66 6f 72 0a 20 20 20 20 20 20 2a 20 74 68 69 73 20 70 75 72 70 6f 73 65 2c 20 ┆ used for * this purpose, ┆
0x0ae0…0b00 68 6f 77 65 76 65 72 20 6e 75 6d 65 72 6f 75 73 20 64 75 6d 70 20 74 61 70 65 73 20 6d 61 6b 65 ┆however numerous dump tapes make┆
0x0b00…0b20 20 74 68 69 73 0a 20 20 20 20 20 20 2a 20 61 73 73 75 6d 70 74 69 6f 6e 2c 20 73 6f 20 77 65 20 ┆ this * assumption, so we ┆
0x0b20…0b40 61 72 65 20 73 74 75 63 6b 20 77 69 74 68 20 69 74 29 0a 20 20 20 20 20 20 2a 20 54 68 65 20 6c ┆are stuck with it) * The l┆
0x0b40…0b60 6f 73 74 2b 66 6f 75 6e 64 20 64 69 72 65 63 74 6f 72 79 20 69 73 20 67 69 76 65 6e 20 74 68 65 ┆ost+found directory is given the┆
0x0b60…0b80 20 6e 65 78 74 20 61 76 61 69 6c 61 62 6c 65 0a 20 20 20 20 20 20 2a 20 69 6e 6f 64 65 20 77 68 ┆ next available * inode wh┆
0x0b80…0ba0 65 6e 20 69 74 20 69 73 20 63 72 65 61 74 65 64 20 62 79 20 60 60 6d 6b 66 78 27 27 2e 0a 20 20 ┆en it is created by ``mkfx''. ┆
0x0ba0…0bc0 20 20 20 20 2a 2f 0a 0a 0a 0a 0a 0a 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 52 4f 4f 54 49 4e ┆ */ #define ROOTIN┆
0x0bc0…0be0 4f 20 20 20 20 20 20 20 20 20 28 28 69 6e 6f 5f 74 29 32 29 20 20 20 20 20 20 2f 2a 20 69 20 6e ┆O ((ino_t)2) /* i n┆
0x0be0…0c00 75 6d 62 65 72 20 6f 66 20 61 6c 6c 20 72 6f 6f 74 73 20 2a 2f 0a 20 20 20 20 20 23 64 65 66 69 ┆umber of all roots */ #defi┆
0x0c00…0c20 6e 65 20 4c 4f 53 54 46 4f 55 4e 44 49 4e 4f 20 20 20 20 28 52 4f 4f 54 49 4e 4f 20 2b 20 31 29 ┆ne LOSTFOUNDINO (ROOTINO + 1)┆
0x0c20…0c40 0a 0a 20 20 20 20 20 2f 2a 0a 20 20 20 20 20 20 2a 20 41 6c 6c 6f 63 61 74 69 6f 6e 20 75 6e 69 ┆ /* * Allocation uni┆
0x0c40…0c60 74 20 72 65 6c 61 74 65 64 20 6c 69 6d 69 74 73 2e 0a 20 20 20 20 20 20 2a 2f 0a 0a 20 20 20 20 ┆t related limits. */ ┆
0x0c60…0c80 20 23 64 65 66 69 6e 65 20 4d 41 58 42 50 55 20 20 20 20 20 20 20 20 20 20 28 44 45 56 5f 42 53 ┆ #define MAXBPU (DEV_BS┆
0x0c80…0ca0 49 5a 45 20 2a 20 4e 42 42 59 29 0a 0a 20 20 20 20 20 2f 2a 0a 20 20 20 20 20 20 2a 20 4d 41 58 ┆IZE * NBBY) /* * MAX┆
0x0ca0…0cc0 49 50 55 20 62 6f 75 6e 64 73 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 69 6e 6f 64 65 73 20 ┆IPU bounds the number of inodes ┆
0x0cc0…0ce0 70 65 72 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 75 6e 69 74 2c 20 61 6e 64 0a 20 20 20 20 20 20 2a ┆per allocation unit, and *┆
0x0ce0…0d00 20 69 73 20 6e 65 65 64 65 64 20 6f 6e 6c 79 20 74 6f 20 6b 65 65 70 20 74 68 65 20 73 74 72 75 ┆ is needed only to keep the stru┆
0x0d00…0d20 63 74 75 72 65 20 73 69 6d 70 6c 65 72 20 62 79 20 68 61 76 69 6e 67 20 74 68 65 0a 20 20 20 20 ┆cture simpler by having the ┆
0x0d20…0d40 20 20 2a 20 6f 6e 6c 79 20 61 20 73 69 6e 67 6c 65 20 76 61 72 69 61 62 6c 65 20 73 69 7a 65 20 ┆ * only a single variable size ┆
0x0d40…0d60 65 6c 65 6d 65 6e 74 20 28 74 68 65 20 66 72 65 65 20 62 69 74 20 6d 61 70 29 2e 0a 20 20 20 20 ┆element (the free bit map). ┆
0x0d60…0d80 20 20 2a 0a 20 20 20 20 20 20 2a 20 4e 2e 42 2e 3a 20 4d 41 58 49 50 55 20 6d 75 73 74 20 62 65 ┆ * * N.B.: MAXIPU must be┆
0x0d80…0da0 20 61 20 6d 75 6c 74 69 70 6c 65 20 6f 66 20 49 4e 4f 50 42 28 66 78 29 2e 0a 20 20 20 20 20 20 ┆ a multiple of INOPB(fx). ┆
0x0da0…0dc0 2a 2f 0a 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 4d 41 58 49 50 55 20 20 20 20 20 20 20 20 20 ┆*/ #define MAXIPU ┆
0x0dc0…0de0 20 32 30 34 38 20 20 20 20 2f 2a 20 6d 61 78 20 6e 75 6d 62 65 72 20 69 6e 6f 64 65 73 2f 61 6c ┆ 2048 /* max number inodes/al┆
0x0de0…0e00 6c 6f 63 20 75 6e 69 74 20 2a 2f 0a 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 4d 49 4e 42 53 49 ┆loc unit */ #define MINBSI┆
0x0e00…0e20 5a 45 20 20 20 20 20 20 20 20 44 45 56 5f 42 53 49 5a 45 0a 0a 20 20 20 20 20 2f 2a 0a 20 20 20 ┆ZE DEV_BSIZE /* ┆
0x0e20…0e40 20 20 20 2a 20 54 68 65 20 70 61 74 68 20 6e 61 6d 65 20 6f 6e 20 77 68 69 63 68 20 74 68 65 20 ┆ * The path name on which the ┆
0x0e40…0e60 66 69 6c 65 20 73 79 73 74 65 6d 20 69 73 20 6d 6f 75 6e 74 65 64 20 69 73 20 6d 61 69 6e 74 61 ┆file system is mounted is mainta┆
0x0e60…0e80 69 6e 65 64 0a 20 20 20 20 20 20 2a 20 69 6e 20 66 78 5f 66 78 6d 6e 74 2e 20 4d 41 58 4d 4e 54 ┆ined * in fx_fxmnt. MAXMNT┆
0x0e80…0ea0 4c 45 4e 20 64 65 66 69 6e 65 73 20 74 68 65 20 61 6d 6f 75 6e 74 20 6f 66 20 73 70 61 63 65 20 ┆LEN defines the amount of space ┆
0x0ea0…0ec0 61 6c 6c 6f 63 61 74 65 64 20 69 6e 0a 20 20 20 20 20 20 2a 20 74 68 65 20 73 75 70 65 72 20 62 ┆allocated in * the super b┆
0x0ec0…0ee0 6c 6f 63 6b 20 66 6f 72 20 74 68 69 73 20 6e 61 6d 65 2e 0a 20 20 20 20 20 20 2a 2f 0a 0a 20 20 ┆lock for this name. */ ┆
0x0ee0…0f00 20 20 20 23 64 65 66 69 6e 65 20 4d 41 58 4d 4e 54 4c 45 4e 20 35 31 32 0a 0a 20 20 20 20 20 2f ┆ #define MAXMNTLEN 512 /┆
0x0f00…0f20 2a 0a 20 20 20 20 20 20 2a 20 54 68 65 20 65 78 74 65 6e 74 20 62 69 74 2d 6d 61 70 20 69 73 20 ┆* * The extent bit-map is ┆
0x0f20…0f40 6c 6f 67 69 63 61 6c 6c 79 20 64 69 76 69 64 65 64 20 69 6e 74 6f 20 74 77 6f 20 73 65 63 74 69 ┆logically divided into two secti┆
0x0f40…0f60 6f 6e 73 20 2d 20 74 68 65 0a 20 20 20 20 20 20 2a 20 73 69 6e 67 6c 65 20 62 6c 6f 63 6b 20 6d ┆ons - the * single block m┆
0x0f60…0f80 61 70 20 61 6e 64 20 74 68 65 20 6d 75 6c 74 69 2d 62 6c 6f 63 6b 20 6d 61 70 2e 20 20 45 61 63 ┆ap and the multi-block map. Eac┆
0x0f80…0fa0 68 20 6f 66 20 74 68 65 73 65 20 74 77 6f 20 73 65 63 74 69 6f 6e 73 0a 20 20 20 20 20 20 2a 20 ┆h of these two sections * ┆
0x0fa0…0fc0 69 73 20 28 6f 62 76 69 6f 75 73 6c 79 29 20 74 68 65 20 73 61 6d 65 20 73 69 7a 65 2e 0a 20 20 ┆is (obviously) the same size. ┆
0x0fc0…0fe0 20 20 20 20 2a 2f 0a 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 45 4d 41 50 42 4c 4b 53 20 20 20 ┆ */ #define EMAPBLKS ┆
0x0fe0…1000 20 20 20 20 20 32 0a 0a 20 20 20 20 20 2f 2a 0a 20 20 20 20 20 20 2a 20 57 65 20 61 73 73 75 6d ┆ 2 /* * We assum┆
0x1000…1020 65 20 68 65 72 65 20 74 68 61 74 20 44 45 56 5f 49 4f 53 49 5a 45 20 69 73 20 74 68 65 20 73 61 ┆e here that DEV_IOSIZE is the sa┆
0x1020…1040 6d 65 20 61 73 20 4d 41 58 42 53 49 5a 45 2c 20 61 0a 20 20 20 20 20 20 2a 20 73 70 65 63 74 61 ┆me as MAXBSIZE, a * specta┆
0x1040…1060 63 75 6c 61 72 6c 79 20 62 61 64 20 61 73 73 75 6d 70 74 69 6f 6e 2e 20 20 44 75 65 20 74 6f 20 ┆cularly bad assumption. Due to ┆
0x1060…1080 74 68 65 20 64 65 73 69 67 6e 20 6f 66 20 74 68 65 20 6d 75 6c 74 69 2d 0a 20 20 20 20 20 20 2a ┆the design of the multi- *┆
0x1080…10a0 20 74 69 65 72 65 64 20 62 69 74 2d 6d 61 70 2c 20 69 66 20 31 30 32 34 2d 62 79 74 65 20 62 6c ┆ tiered bit-map, if 1024-byte bl┆
0x10a0…10c0 6f 63 6b 73 20 61 72 65 20 75 73 65 64 2c 20 74 68 65 72 65 20 61 72 65 20 31 34 20 74 69 65 72 ┆ocks are used, there are 14 tier┆
0x10c0…10e0 73 0a 20 20 20 20 20 20 2a 20 69 6e 20 74 68 65 20 6d 61 70 2c 20 77 68 69 63 68 20 73 70 61 6e ┆s * in the map, which span┆
0x10e0…1100 73 20 74 77 6f 20 6c 6f 67 69 63 61 6c 20 62 6c 6f 63 6b 73 2e 0a 20 20 20 20 20 20 2a 2f 0a 0a ┆s two logical blocks. */ ┆
0x1100…1120 20 20 20 20 20 23 64 65 66 69 6e 65 20 4e 54 49 45 52 53 20 20 28 44 45 56 5f 42 53 48 49 46 54 ┆ #define NTIERS (DEV_BSHIFT┆
0x1120…1140 20 2b 20 34 29 0a 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 49 53 42 49 54 28 65 6d 61 70 2c 20 ┆ + 4) #define ISBIT(emap, ┆
0x1140…1160 62 69 74 29 20 28 20 65 6d 61 70 5b 28 62 69 74 29 20 2f 20 4e 42 42 59 5d 20 26 20 28 31 20 3c ┆bit) ( emap[(bit) / NBBY] & (1 <┆
0x1160…1180 3c 20 28 28 62 69 74 29 20 25 20 4e 42 42 59 29 29 20 29 0a 0a 20 20 20 20 20 23 64 65 66 69 6e ┆< ((bit) % NBBY)) ) #defin┆
0x1180…11a0 65 20 42 49 54 5f 49 4e 5f 54 49 45 52 28 62 2c 20 74 29 20 20 20 20 20 20 20 28 28 62 29 20 3e ┆e BIT_IN_TIER(b, t) ((b) >┆
0x11a0…11c0 3e 20 28 74 29 29 0a 0a 20 20 20 20 20 73 74 72 75 63 74 20 74 69 65 72 5f 64 65 73 63 72 69 70 ┆> (t)) struct tier_descrip┆
0x11c0…11e0 74 6f 72 0a 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 73 68 6f 72 74 20 20 20 20 20 20 20 ┆tor { short ┆
0x11e0…1200 74 5f 65 6d 61 70 62 6c 6b 3b 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 20 72 65 6c 61 74 ┆t_emapblk; /* relat┆
0x1200…1220 69 76 65 20 62 6c 6f 63 6b 20 77 69 74 68 69 6e 20 65 6d 61 70 20 2a 2f 0a 20 20 20 20 20 20 20 ┆ive block within emap */ ┆
0x1220…1240 20 20 73 68 6f 72 74 20 20 20 20 20 20 20 74 5f 62 69 74 6f 66 66 73 65 74 3b 20 20 20 20 20 20 ┆ short t_bitoffset; ┆
0x1240…1260 20 20 20 20 20 20 2f 2a 20 66 72 6f 6d 20 73 74 61 72 74 20 6f 66 20 62 6c 6f 63 6b 20 2a 2f 0a ┆ /* from start of block */ ┆
0x1260…1280 20 20 20 20 20 20 20 20 20 73 68 6f 72 74 20 20 20 20 20 20 20 74 5f 6e 65 78 74 65 6e 74 73 3b ┆ short t_nextents;┆
0x1280…12a0 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 20 74 69 65 72 20 6c 65 6e 67 74 68 20 69 6e 20 62 ┆ /* tier length in b┆
0x12a0…12c0 69 74 73 20 2a 2f 0a 20 20 20 20 20 20 20 20 20 73 68 6f 72 74 20 20 20 20 20 20 20 74 5f 65 78 ┆its */ short t_ex┆
0x12c0…12e0 74 73 69 7a 65 3b 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 20 6e 75 6d 62 65 72 20 6f 66 ┆tsize; /* number of┆
0x12e0…1300 20 62 6c 6f 63 6b 73 20 28 6e 6f 74 20 62 79 74 65 73 29 20 2a 2f 0a 20 20 20 20 20 7d 3b 0a 0a ┆ blocks (not bytes) */ }; ┆
0x1300…1320 20 20 20 20 20 23 69 66 64 65 66 20 4b 45 52 4e 45 4c 0a 20 20 20 20 20 73 74 72 75 63 74 20 74 ┆ #ifdef KERNEL struct t┆
0x1320…1340 69 65 72 5f 64 65 73 63 72 69 70 74 6f 72 20 74 64 5b 4e 54 49 45 52 53 5d 3b 0a 0a 0a 0a 0a 0a ┆ier_descriptor td[NTIERS]; ┆
0x1340…1360 0a 20 20 20 20 20 23 65 6e 64 69 66 20 4b 45 52 4e 45 4c 0a 0a 20 20 20 20 20 2f 2a 0a 20 20 20 ┆ #endif KERNEL /* ┆
0x1360…1380 20 20 20 2a 20 50 65 72 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 75 6e 69 74 20 69 6e 66 6f 72 6d 61 ┆ * Per allocation unit informa┆
0x1380…13a0 74 69 6f 6e 3b 20 6f 6e 65 20 70 65 72 20 61 75 20 62 6c 6f 63 6b 20 70 6c 75 73 0a 20 20 20 20 ┆tion; one per au block plus ┆
0x13a0…13c0 20 20 2a 20 6f 6e 65 20 69 6e 20 74 68 65 20 66 78 20 62 6c 6f 63 6b 20 77 68 69 63 68 20 63 6f ┆ * one in the fx block which co┆
0x13c0…13e0 6e 74 61 69 6e 73 20 73 79 73 74 65 6d 2d 77 69 64 65 20 74 6f 74 61 6c 73 2e 0a 20 20 20 20 20 ┆ntains system-wide totals. ┆
0x13e0…1400 20 2a 20 41 73 20 6f 66 20 54 58 35 2c 20 6f 6e 6c 79 20 75 73 5f 6e 64 69 72 20 69 73 20 6d 61 ┆ * As of TX5, only us_ndir is ma┆
0x1400…1420 69 6e 74 61 69 6e 65 64 20 6f 6e 20 64 69 73 6b 20 28 74 6f 6f 20 68 61 72 64 20 74 6f 20 72 65 ┆intained on disk (too hard to re┆
0x1420…1440 63 6f 6d 70 75 74 65 29 0a 20 20 20 20 20 20 2a 20 61 6c 6c 20 74 68 65 20 6f 74 68 65 72 20 66 ┆compute) * all the other f┆
0x1440…1460 69 65 6c 64 73 20 61 72 65 20 72 65 63 6f 6d 70 75 74 65 64 20 61 74 20 6d 6f 75 6e 74 20 74 69 ┆ields are recomputed at mount ti┆
0x1460…1480 6d 65 2e 0a 20 20 20 20 20 20 2a 2f 0a 0a 20 20 20 20 20 73 74 72 75 63 74 20 75 73 75 6d 0a 20 ┆me. */ struct usum ┆
0x1480…14a0 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 6c 6f 6e 67 20 20 20 20 20 20 20 20 75 73 5f 6e 64 ┆ { long us_nd┆
0x14a0…14c0 69 72 3b 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 20 6e 75 6d 62 65 72 20 6f 66 20 ┆ir; /* number of ┆
0x14c0…14e0 61 6c 6c 6f 63 61 74 65 64 20 64 69 72 65 63 74 6f 72 69 65 73 20 2a 2f 0a 20 20 20 20 20 20 20 ┆allocated directories */ ┆
0x14e0…1500 20 20 6c 6f 6e 67 20 20 20 20 20 20 20 20 75 73 5f 6e 69 66 72 65 65 3b 20 20 20 20 20 20 20 20 ┆ long us_nifree; ┆
0x1500…1520 20 20 20 20 20 20 2f 2a 20 6e 75 6d 62 65 72 20 6f 66 20 66 72 65 65 20 69 6e 6f 64 65 73 20 2a ┆ /* number of free inodes *┆
0x1520…1540 2f 0a 20 20 20 20 20 20 20 20 20 6c 6f 6e 67 20 20 20 20 20 20 20 20 75 73 5f 6e 65 66 72 65 65 ┆/ long us_nefree┆
0x1540…1560 5b 4e 54 49 45 52 53 5d 3b 20 20 20 20 20 20 2f 2a 20 6e 75 6d 62 65 72 73 20 6f 66 20 66 72 65 ┆[NTIERS]; /* numbers of fre┆
0x1560…1580 65 20 65 78 74 65 6e 74 73 20 2a 2f 0a 20 20 20 20 20 7d 3b 0a 0a 20 20 20 20 20 73 74 72 75 63 ┆e extents */ }; struc┆
0x1580…15a0 74 20 66 78 5f 6c 69 73 74 0a 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 73 74 72 75 63 74 ┆t fx_list { struct┆
0x15a0…15c0 20 66 78 5f 6c 69 73 74 20 20 20 20 20 20 2a 66 78 6c 5f 6e 65 78 74 3b 0a 20 20 20 20 20 20 20 ┆ fx_list *fxl_next; ┆
0x15c0…15e0 20 20 69 6e 6f 5f 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 78 6c 5f 69 6e 6f 3b 0a 20 ┆ ino_t fxl_ino; ┆
0x15e0…1600 20 20 20 20 20 20 20 20 64 61 64 64 72 5f 74 20 20 20 20 20 20 20 20 20 20 20 20 20 66 78 6c 5f ┆ daddr_t fxl_┆
0x1600…1620 62 6e 3b 0a 20 20 20 20 20 7d 3b 0a 0a 20 20 20 20 20 2f 2a 0a 20 20 20 20 20 20 2a 20 53 75 70 ┆bn; }; /* * Sup┆
0x1620…1640 65 72 20 62 6c 6f 63 6b 20 66 6f 72 20 61 20 66 69 6c 65 20 73 79 73 74 65 6d 2e 0a 20 20 20 20 ┆er block for a file system. ┆
0x1640…1660 20 20 2a 2f 0a 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 46 58 5f 4d 41 47 49 43 20 20 20 20 20 ┆ */ #define FX_MAGIC ┆
0x1660…1680 20 20 20 30 78 30 31 31 39 35 35 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 46 58 5f 42 53 48 49 ┆ 0x011955 #define FX_BSHI┆
0x1680…16a0 46 54 20 20 20 20 20 20 20 44 45 56 5f 42 53 48 49 46 54 0a 20 20 20 20 20 23 64 65 66 69 6e 65 ┆FT DEV_BSHIFT #define┆
0x16a0…16c0 20 46 58 5f 42 4d 41 53 4b 20 20 20 20 20 20 20 20 28 44 45 56 5f 42 53 49 5a 45 20 2d 20 31 29 ┆ FX_BMASK (DEV_BSIZE - 1)┆
0x16c0…16e0 0a 0a 20 20 20 20 20 2f 2a 20 20 76 61 6c 75 65 73 20 66 6f 72 20 66 78 5f 66 6c 61 67 73 20 2a ┆ /* values for fx_flags *┆
0x16e0…1700 2f 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 46 58 5f 4c 4f 47 57 52 41 50 50 45 44 20 20 20 30 ┆/ #define FX_LOGWRAPPED 0┆
0x1700…1720 78 30 31 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 20 6c 6f 67 20 68 61 73 20 77 72 61 70 70 65 ┆x01 /* log has wrappe┆
0x1720…1740 64 20 61 72 6f 75 6e 64 20 2a 2f 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 46 58 5f 53 59 4e 43 ┆d around */ #define FX_SYNC┆
0x1740…1760 45 44 20 20 20 20 20 20 20 30 78 30 32 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 20 66 73 20 73 ┆ED 0x02 /* fs s┆
0x1760…1780 79 6e 63 20 68 61 73 20 6f 63 63 75 72 65 64 20 2a 2f 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 ┆ync has occured */ #define ┆
0x1780…17a0 46 58 5f 55 4e 4d 4f 55 4e 54 20 20 20 20 20 20 30 78 30 34 20 20 20 20 20 20 20 20 20 20 20 20 ┆FX_UNMOUNT 0x04 ┆
0x17a0…17c0 2f 2a 20 66 69 6c 65 20 73 79 73 74 65 6d 20 69 73 20 75 6e 6d 6f 75 6e 74 69 6e 67 20 2a 2f 0a ┆/* file system is unmounting */ ┆
0x17c0…17e0 20 20 20 20 20 23 64 65 66 69 6e 65 20 46 58 5f 42 4c 4f 43 4b 5f 4f 50 45 4e 53 20 20 30 78 30 ┆ #define FX_BLOCK_OPENS 0x0┆
0x17e0…1800 38 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 20 66 69 6c 65 20 73 79 73 74 65 6d 20 69 73 20 75 ┆8 /* file system is u┆
0x1800…1820 6e 6d 6f 75 6e 74 69 6e 67 20 2a 2f 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 46 58 5f 55 4d 41 ┆nmounting */ #define FX_UMA┆
0x1820…1840 53 4b 20 20 20 20 20 20 20 20 30 78 30 63 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 20 75 6e 6d ┆SK 0x0c /* unm┆
0x1840…1860 6f 75 6e 74 20 6d 61 73 6b 73 20 2a 2f 0a 20 20 20 20 20 23 64 65 66 69 6e 65 20 46 58 5f 52 45 ┆ount masks */ #define FX_RE┆
0x1860…1880 43 4f 56 45 52 59 20 20 20 20 20 30 78 31 30 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 20 72 65 ┆COVERY 0x10 /* re┆
0x1880…18a0 63 6f 76 65 72 79 20 69 6e 20 70 72 6f 67 72 65 73 73 20 2a 2f 0a 0a 20 20 20 20 20 2f 2a 0a 20 ┆covery in progress */ /* ┆
0x18a0…18c0 20 20 20 20 20 2a 20 73 74 72 75 63 74 20 74 6f 20 6b 65 65 70 20 74 72 61 63 6b 20 6f 66 20 69 ┆ * struct to keep track of i┆
0x18c0…18e0 6e 64 69 72 20 62 6c 6f 63 6b 73 20 69 6e 20 6d 65 6d 6f 72 79 2e 0a 20 20 20 20 20 20 2a 20 41 ┆ndir blocks in memory. * A┆
0x18e0…1900 20 6c 69 73 74 20 69 73 20 6d 61 69 6e 74 61 69 6e 65 64 20 66 72 6f 6d 20 74 68 65 20 73 75 70 ┆ list is maintained from the sup┆
0x1900…1920 65 72 20 62 6c 6f 63 6b 0a 20 20 20 20 20 20 2a 2f 0a 0a 20 20 20 20 20 73 74 72 75 63 74 20 69 ┆er block */ struct i┆
[…truncated at 200 lines…]