2. Overview of the ﬁle system The ﬁle system is discussed in detail in [Mckusick84]; this section gives a brief overview. 2.1. Superblock A ﬁle system is described by its super-block. The super-block is built when the ﬁle system is created (newfs(8)) and never changes. The super-block contains the basic parameters of the ﬁle system, such as the number of data blocks it contains and a count of the maximum number of ﬁles. Because the super-block contains critical data, newfs replicates it to protect against catastrophic loss. The default super block always resides at axed offset from the beginning of the ﬁle system’s disk partition. The redundant super blocks are not referenced unless ahead crash or other hard disk error causes the default super-block to be unusable. The redundant blocks are sprinkled throughout the disk partition. Within the ﬁle system are ﬁles. Certain ﬁles are distinguished as directories and contain collections of pointers to ﬁles that may themselves be directories. Every ﬁle has a descriptor associated with it called an inode. The inode contains information describing ownership of the ﬁle, time stamps indicating modiﬁ- cation and access times for the ﬁle, and an array of indices pointing to the data blocks for the ﬁle. In this section, we assume that the ﬁrst 12 blocks of the ﬁle are directly referenced by values stored in the inode structure itself. The inode structure may also contain references to indirect blocks containing further data block indices. Ina ﬁle system with a 4096 byte block size, a singly indirect block contains 1024 further block addresses, a doubly indirect block contains 1024 addresses of further single indirect blocks, and a triply indirect block contains 1024 addresses of further doubly indirect blocks (the triple indirect block is never needed in practice). In order to create ﬁles with up to 2 ↑ 32 bytes, using only two levels of indirection, the minimum size of ale system block is 4096 bytes. The size of ﬁle system blocks can be any power of two greater than or equal to 4096. The block size of the ﬁle system is maintained in the super-block, so it is possible for ﬁle systems of different block sizes to be accessible simultaneously on the same system. The block size must be decided when newfs creates the ﬁle system the block size cannot be subsequently changed without rebuilding the ﬁle system.