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
-
Gnome Fans Everywhere Rejoice for the Latest Release
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
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.