Concept

Filesystem

Definition

A filesystem is the abstraction that imposes structure on raw storage. A hard drive or solid-state device is, at the hardware level, an array of fixed-size blocks of bytes. A filesystem layers on top of that array the user-facing concepts of named files (sequences of bytes with metadata), directories (named containers that hold files and other directories), and a single rooted tree connecting everything from one starting point (slash, in Unix).

The filesystem is what lets you say "open the report in my documents folder" rather than "read blocks 8192 through 8447 of partition two." It is one of the most successful abstractions in computing: the same conceptual model — files, directories, paths — has survived sixty years of hardware change.

Why it matters

How it works

A filesystem divides the storage device into structured regions: a superblock describing the layout, an inode table holding metadata for every file, a directory structure mapping names to inode numbers, and a data area containing the actual file bytes. When you open a file by path, the kernel walks the path one component at a time — reading the root directory to find the next component's inode, reading that inode to find its data blocks, then continuing if the entry is itself a directory. The walk terminates at the final inode, whose metadata and data blocks are now accessible.

Modern filesystems add layers of optimisation and safety on top of this skeleton. Journaling writes pending changes to a circular log before applying them so an interrupted operation can be replayed or rolled back at boot. Extents replace the older block-pointer scheme with contiguous-range descriptors for faster large-file access. Copy-on-write filesystems like ZFS and Btrfs write new data to new blocks rather than overwriting in place, enabling cheap snapshots and reliable corruption detection through checksumming. The user-facing model — files in a tree — does not change, but what happens underneath has evolved continuously.

Where it goes next

Continue exploring

Tags