Search⌘ K

Overall Organization

Explore the on-disk organization of a simple file system by understanding how storage blocks are allocated for user data, inodes, allocation bitmaps, and the superblock. Learn how these data structures work together to efficiently manage files and metadata in a disk partition.

We now develop the overall on-disk organization of the data structures of the vsfs file system.

Blocks

The first thing we’ll need to do is divide the disk into blocks. Simple file systems use just one block size, and that’s exactly what we’ll do here. Let’s choose a commonly-used size of 4 KB.

Thus, our view of the disk partition where we’re building our file system is simple: a series of blocks, each of size 4 KB. The blocks are addressed from 0 to N − 1, in a partition of size N 4-KB blocks. Assume we have a really small disk, with just 64 blocks:

Data region

Let’s now think about what we need to store in these blocks to build a file system. Of course, the first thing that comes to mind is user data. In fact, most of the space in any file system is (and should be) user data. Let’s call the region of the disk we use for user data the data region, ...