The ext filesystem – a four-generation retrospective
Family
The extended filesystem has been part of the Linux kernel since 0.96c – a faithful companion of the free operating system. With its developments – or, rather, rebirths – through ext2, ext3, and ext4, it is one of the oldest Linux-specific software projects.
The Linux kernel [1] is now almost 22 years old. Its faithful companion since 1992 has been the family of extended filesystems, ext [2]-[4]. For many reasons, Linux took its first steps with a filesystem derived from Minix [3]-[5]). Originally, Linus Torvalds only wanted to develop a better terminal emulator for Minix. Therefore, he had no need for a separate filesystem. Even as the Torvalds project turned into an operating system kernel, the development still continued under Minix. The shared filesystem made it easier to exchange data.
A Star Is Born
The filesystem used in Minix, which was originally developed for educational purposes, had some significant limitations. The maximum file size was 64MB and the maximum filename length was 14 characters [4]. For some Linux pioneers, these limits were eventually unsustainable, and they started to think about a new, native Linux filesystem. Linus integrated the VFS (virtual filesystem) layer into kernel version 0.96a, which facilitated adding additional filesystems (Figure 1) [4] [6].
In version 0.96c, the first member of the ext filesystem (FS) family saw the light of the Linux world [2]. Rémy Card, the main architect, was inspired by the design of the UFS (Unix filesystem). Filenames were now allowed to be 255 characters on a filesystem of up to 2GB.
Although ext represented an improvement over the Minix filesystem, it still had a number of elements the developers absolutely hated, such as only one timestamp, instead of the three typically in use today, and the use of linked lists for free space, which quickly led to fragmentation and poor performance.
The replacement of ext was therefore inevitable and not long in coming. The successor, ext2, became part of the Linux kernel in version 0.99.7 (March 1993). The maximum size of the filesystem could now be a massive 4TB, and a file could be up to 2GB in size. In 1993, these were unbelievably large disk sizes. As you can guess, ext2 now also had the familiar three timestamps: file creation, last change, and last access.
Competitor Xia
Interestingly, ext2 was not unrivaled in this race. Xia FS – named after its developer, Frank Xia [6] – was based on Minix FS and addressed its shortcomings (Table 1). The first alpha versions of both Xia and ext2 were released in January 1993, and Xia initially proved to be more stable. However, the larger developer community backed the ext successor and soon helped to make it stable [7].
Table 1
Filesystem Features (March 1993)
Minix | ext | ext2 | Xia |
---|---|---|---|
64MB |
2GB |
4TB |
2GB |
64MB |
2GB |
2GB |
64MB |
30 characters |
255 characters |
255 characters |
248 characters |
1 |
1 |
3 |
3 |
The Second Wave
For almost a decade, the ext2 filesystem was the de facto standard for Linux. It still enjoys significant popularity today: for boot media or core dump data storage. The first versions were mainly from the pen of Card, who had already written ext, Stephen Tweedie, and Theodore (Ted) Ts'o.
Their work, published in 1994 [4] [8] as the successor to ext, is a successful representation of the origin, the status, and development potential of the new standard Linux filesystem.
Like its predecessor, ext2 is based on the design principles of UFS and thus has a robust basic structure. Understanding the concept of inodes, directories, and links does not require a computer science degree (Figure 2). After the boot sector, the disk is divided into block groups. At the beginning of each block group is a superblock – or its backup – that describes the filesystem. Information for the block groups then follows. The filesystem uses bitmaps and tables to manage the (unused) blocks and inodes.
The remaining space belongs to the data. When designing ext2, the developers planned for future extensions. Card et al. consciously left enough space in the structures of the filesystem to allow new features to be defined later, so users could benefit from new features without having to create the filesystem again. This approach, which is fairly simple to describe, is an important pillar of the success of the ext FS family. Because ext FS has well-understood internals and has been part of Linux almost from the outset, it has often served as a test bed for extensions of the VFS layer.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.