Final Year Project:
Using Linux Filesystems Under Windows
Chris Bryden
BEng. Electronics and Software Engineering
School of Computer Science
University of Birmingham
7
3.2 Common File System Concepts
All filesystems are simply made up of blocks of data on a disk. This
information needs to be organised in a way that is not only robust and reliable,
but also provides good I/O performance. This is the job of the filesystem. The
concepts described in this section are common to many different filesystems and
provide a basis for the more detailed discussion of the second extended
filesystem that follows. All Linux filesystems implement a set of common
concepts that are derived form the Unix operating system: Individual files are
represented by inodes, which store information about the file and hold the
locations of the data blocks that make up the file and directories are
implemented as a special type of file containing a list of directory entries.
3.2.1 Blocks
As mentioned above, all filesystems are divided into logical blocks of
data, each read or write from disk uses an integral number of these blocks. A
block is the smallest amount of space that can be allocated to a file. These
blocks are known as logical blocks, that is they are a group of physical disk
sectors. The logical block size must be the physical sector size multiplied by a
power of two.
If a file is smaller than a block, or the end of the file falls between block
boundaries, the extra space in the block is wasted. This wastage can be
alleviated by using smaller allocation units known as fragments, however these
are not implemented in all filesystems yet.
The logical blocks are numbered from zero up to the total number of
blocks minus one, this number is known as the block address, it is used to
identify a unique block within the filesystem.
These blocks may be organised into groups of blocks to make the
allocation of blocks and management of the filesystem housekeeping information
easier and more robust.