The ext filesystem – a four-generation retrospective

Family

© Lead Image © Bea Kraus, medchip, tempusfugit, Robert Mizerek 123RF.com

© Lead Image © Bea Kraus, medchip, tempusfugit, Robert Mizerek 123RF.com

Article from Issue 156/2013
Author(s):

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].

Figure 1: The Linux kernel 0.96a introduced VFS as a kind of jump-off point for the ext filesystem in 0.96c.

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.

Figure 2: The basic structure of ext2 comes from UFS.

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

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Choose a Filesystem

    Every Linux computer needs a filesystem, and users often choose a filesystem by habit or by default. But, if you're seeking stability, versatility, or a small performance advantage, it pays to take a closer look.

  • File systems

    Many users just opt for the defaults and don’t think about the file system when they install Linux. But if better performance is your goal, it pays to do some shopping.

  • Managing Linux Filesystems

    Even with all the talk of Big Data and the storage revolution, a steady and reliable block-based filesystem is still a central feature of most Linux systems.

  • Ext4

    The newest child in the Ext filesystem family provides better performance and supports bigger filesystems. Are you ready for Ext4?

  • Kernel: Ext 4 Filesystem Moves Beyond Developer Status

    Theodore Ts'o has renamed the Ext4 filesystem, for which he has been responsible for source and documentation, from extdev to ext4. Linus Torvalds has also incorporated the change into his personal source tree for the upcoming Kernel 2.6.28.

comments powered by Disqus
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.

Learn More

News