|
|
Subscribe / Log in / New account

rm -r fs/ext3

By Jonathan Corbet
July 21, 2015
The kernel development community is quite good at adding code to the kernel; its record on removing code is not always quite so bright. There are all kinds of reasons why removing code can be difficult; often, even code that appears to be without use stays around just in case somebody, somewhere, still needs it. Removal can be hard even when there is a known replacement that should work for all users; that can be seen in the case of the ext3 filesystem.

A few eyebrows went up when Jan Kara posted a patch removing the ext3 filesystem recently. Some users clearly thought the move represented a forced upgrade to ext4; Randy Dunlap remarked that "this looks like an April 1 joke to me". In truth, it is neither a joke nor a forced upgrade; it is, however, an interesting story to look back at.

Nine years ago, in the middle of 2006, the premier filesystem for most users was ext3, but that filesystem was showing its age in a few ways. Its 32-bit block pointers limited maximum filesystem size to 8TB, a limit that was not too restrictive for most users at the time, but which would be highly problematic today. The filesystem tracks blocks in files with individual pointers, leading to large amounts of metadata overhead and poor performance on larger files. These problems, along with a number of missing features, had long since convinced developers that something newer and better was required.

For a while, some thought that might be a filesystem called reiser4, but that story failed to work out well even before that filesystem's primary developer left the development community.

The ext3 developers came up with a number of patches aimed at easing its scalability problems. These patches were made directly against the ext3 filesystem, with the idea that ext3 would evolve in the direction that was needed. There was, however, some resistance to the idea of making major changes to ext3 from developers who valued that filesystem in its current, stable form. One of those developers, it turned out, was Linus who, as we all know, has a relatively strong voice in such decisions.

And so it came to be that the ext3 developers announced their intent to create a new filesystem called "ext4"; all new-feature development would be done there. Actually, the new filesystem was first called "ext4dev" to emphasize its experimental nature; the plan was to rename it to "ext4" once things were stable, "probably in 6-9 months". In the real world, that renaming happened nearly 28 months later and was merged for the 2.6.28 kernel.

Since then, of course, ext4 has become the primary Linux filesystem for many users. It has seen many new features added, and it is not clear that this process will stop, even though ext4 is now in the same position that ext3 was nine years ago. Through this entire history, though, ext4 has retained the ability to mount and manage ext2 and ext3 filesystems; it can be configured to do so transparently in the absence of the older ext2 and ext3 modules. And, indeed, many distributions now don't bother to build the older filesystem modules, relying on ext4 to manage all three versions of the filesystem.

Back when ext4 was created, it was envisioned that the older filesystem code would eventually become unnecessary. The plan was that when this happened, "perhaps 12-18 months out", the ext3 code would be removed. Once again, reality had something different to say, and the ext3 code endured for over nine years. Unless something surprising happens, though, that record is about to come to an end; ext3 could be removed as soon as the 4.3 development cycle, taking some 28,000 lines of code with it. And most users, even those with ext3 filesystems, will not even notice.

One might well wonder whether we will see a similar story in the future and the addition of an ext5 filesystem. For the time being, that does not seem to be in the works. Ext4 has picked up a number of features in recent years, with encryption as the most recent example, but there has been no talk of moving development to a new source base. Over the years, perhaps, the ext4 developers have done well enough at not breaking things that users are less worried about new development than they once might have been.

At the other end, there is the question of the ext2 filesystem. That code, too, could be replaced by ext4, but there seems to be no pressure to do so. Ext2 is small, weighing in at less than 10,000 lines of code; ext3 and the associated JBD journaling code come in at 28,000, while ext4 and JBD2 add up to closer to 60,000 lines. The simplicity of ext2 makes it a good filesystem for developers to experiment with, and its maintenance cost is nearly zero. So there is no real reason to take it out anytime soon.

Ext3, being rather larger than ext2, is a more promising target to remove, though Jan said that its maintenance cost was pretty low. The fact that this code has been so thoroughly replaced makes the removal decision relatively easy — but that decision still took nine years to come about. Even so, if all old kernel code were this easy to get rid of, the kernel would be quite a bit smaller than it is today.

Index entries for this article
KernelFilesystems/ext3


to post comments

rm -r fs/ext3

Posted Jul 23, 2015 6:39 UTC (Thu) by davidstrauss (guest, #85867) [Link] (5 responses)

> that filesystem's primary developer left the development community.

Understatement much?

rm -r fs/ext3

Posted Jul 23, 2015 7:14 UTC (Thu) by fishface60 (subscriber, #88700) [Link] (4 responses)

Well, this isn't an article about the sordid history of reiserfs. I think it's entirely appropriate to have glossed over it to get on with the topic at hand.

rm -r fs/ext3

Posted Jul 23, 2015 16:08 UTC (Thu) by davidstrauss (guest, #85867) [Link] (3 responses)

> Well, this isn't an article about the sordid history of reiserfs. I think it's entirely appropriate to have glossed over it to get on with the topic at hand.

I agree. I don't think, either, that the article should have gone into details. I'm just amused that the wording suggests that it was Reiser's decision by omission of the circumstances. I'd feel the same if anyone wrote that George Coe would "no longer be performing as Woodhouse in any future Archer episodes." *Usually*, when someone leaves a development community, it's a personal, interpersonal, or work-related decision.

rm -r fs/ext3

Posted Jul 23, 2015 16:16 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link] (2 responses)

>*Usually*, when someone leaves a development community, it's a personal, interpersonal, or work-related decision.

I think it is fair to say it was his personal decision that resulted in him unable to be part of the development community or society itself.

rm -r fs/ext3

Posted Nov 2, 2015 19:00 UTC (Mon) by jcm (subscriber, #18262) [Link] (1 responses)

But at the article alludes, reiserfs was a terrible filesystem even before the guy was a certified murdering nutjob.

rm -r fs/ext3

Posted Nov 2, 2015 19:13 UTC (Mon) by rahulsundaram (subscriber, #21946) [Link]

The article alludes to no such thing. There is just a single sentence on reiserfs4.

rm -r fs/ext3

Posted Jul 23, 2015 19:04 UTC (Thu) by linusw (subscriber, #40300) [Link] (10 responses)

As for stuff being left around "just in case it is needed", in early 2013 I had to get data off an MiniScribe MFM disk. (For youngsters, MFM was before IDE, which was before ATA which was before SATA.) The controller card was a PC XT card which could fit in a Pentium, with manually configured IRQ and removing the ROM, and fixing up the IN TREE driver, it WORKED, and extracted the data from the disk, with some help from ddrescue. The next kernel cycle the driver was deleted, because of being ancient, but I still for one was grateful for it being kept around.

Details:
http://dflund.se/~triad/krad/linux-on-pentium-mmx.html

Now grandpa will stop rambling.

rm -r fs/ext3

Posted Jul 23, 2015 19:28 UTC (Thu) by pbonzini (subscriber, #60935) [Link] (1 responses)

We've been wondering all this time what the heck was on that drive!

rm -r fs/ext3

Posted Jul 23, 2015 22:07 UTC (Thu) by linusw (subscriber, #40300) [Link]

In 1993 I had my heart broken by a girl and she was significant, so I went home and wrote a long inspired piece of text about the same night, I always wanted to get back in and read it. Simple.

rm -r fs/ext3

Posted Jul 23, 2015 21:54 UTC (Thu) by aeruder (guest, #22597) [Link]

I 100% agree with your implied opinion that drivers shouldn't be removed because they aren't used. The major difference here is that there is still an in-tree driver that will handle ext3 -- and that is the ext4 driver.

rm -r fs/ext3

Posted Jul 24, 2015 0:30 UTC (Fri) by JdGordy (subscriber, #70103) [Link] (3 responses)

yeah, but for stupidly old hardware it pretty much implies there is no need to be running the latest kernel, so what would have been the problem if your driver was removed 5 years earlier when you still can get the old kernel source?

rm -r fs/ext3

Posted Jul 24, 2015 1:50 UTC (Fri) by dlang (guest, #313) [Link] (1 responses)

> so what would have been the problem if your driver was removed 5 years earlier when you still can get the old kernel source?

getting the rest of the distro to install along with the kernel so that you can use it.

rm -r fs/ext3

Posted Jul 24, 2015 1:56 UTC (Fri) by JdGordy (subscriber, #70103) [Link]

http://cdimage.debian.org/cdimage/archive/ If the data on the disk is that important then fuffying around getting an old distro to install definitly sounds worth it.

rm -r fs/ext3

Posted Jul 28, 2015 22:30 UTC (Tue) by linusw (subscriber, #40300) [Link]

Bit rot. There is always some extra modern tool you need to compile (like ddrescue). And it need modern library deps too. The GCC for userspace is built with headers for some kernel version, forcing you to have an old toolchain too. And then it turns out that doesn't compile or run because the ABI changed. All of a sudden you're in an all-out legacy land trying to make things compile. That is usually a waste of time compared to just using the latest of everything, like you do every day.

rm -r fs/ext3

Posted Jul 24, 2015 2:46 UTC (Fri) by hobarrera (guest, #101888) [Link]

Honestly, I think that in these very special scenarios, it's just fine to use a very old kernel (eg: grab a Debian image from 10 years ago).

There's no need to run the latest kernel, and I don't think you'll be using that hardware for much more than copying your data.

rm -r fs/ext3

Posted Jul 24, 2015 12:42 UTC (Fri) by jezuch (subscriber, #52988) [Link]

> As for stuff being left around "just in case it is needed"...

A less extreme example is my NAS, which has a PATA port with a flash drive installed. It requires the "Legacy PATA" driver to work... slowly. Unfortunately stock Debian kernel does not have this module enabled so I'm forced to compile special kernels for this one machine.

rm -r fs/ext3

Posted Jul 24, 2015 19:21 UTC (Fri) by utoddl (guest, #1232) [Link]

I very recently pulled a SCSI hard drive out of my old Amiga 3000 and was able to get linux to mount the Amiga partitioned 5 volumes and read the whole 200MB of data there, some of which was actually useful to have again. I'm very glad those old linux kernel pieces were still available to make this possible. (It's not like the Amiga end of things has changed much in the last 20 years.)

rm -r fs/ext3

Posted Aug 1, 2015 14:38 UTC (Sat) by kenieevan (guest, #84691) [Link]

I thinks most old code shall be driver or fs code. For most machine, these code may be not useful and can be tailored manually.


Copyright © 2015, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds