The truth about IFS

There used to be a file system called the Inheriting File System (IFS) for Linux. Many people vaguely remember its existence and the topic comes up from time to time in various Linux newsgroups or mailing lists. Here's a description of what IFS was and why it isn't anymore.

IFS allows merging several file systems in a stack-like way, such that files from lower layers become visible only if there are no files with the same path in an upper layer. Furthermore, all file creations and write accesses go to the top layer, which can be used to create the effect of having writable read-only media (e.g. CD-ROMs). See the README file for more details.

IFS was heavily inspired by Sun's Translucent File Service (TFS) but extended it to allow virtually any number of overlaid file systems. I started IFS in spring '93 and released the latest version for 0.99pl11/0.99pl12alpha kernels in summer '93. There's been an update for 0.99pl14 kernels in spring '94. (Don't know who did it - that person unfortunately didn't leave his or her name in any of the files.)

There has been no further development and the interfaces IFS uses in the Linux kernel have undergone thorough changes and bear very little resemblance to what I used back then, so updating IFS would probably be much harder than to start over from scratch. Here's what I wrote to the linux-kernel mailing list a few years ago on the issue of IFS:

Well, I completed it to the point where it was a nice proof of concept, but still with problems (leaks inodes, probably has a few races left, was also a bit too liberal with locking, etc.).

Then I looked back at what I did and was disgusted by its complexity. So I decided that, before I might even consider proposing inclusion into the mainstream kernel, I'd have to see how much poorer (performance-wise) a user-space implementation would be. I did some initial hacking on NFS until I convinced myself that userfs might be the better approach. Unfortunately, I never found the time to work on that.

I also noticed that amd should have some functionality that provides at least a subset of what IFS could do (you can quite easily apply the concept of IFS to caching, CD-ROM "writing", storage management, etc.), although I never actually tried that part.

By the way, IFS (Inheriting File System) was indeed inspired by Sun's TFS (Translucent File System). The main difference between the two is that IFS allows the stack of file systems to be arbitrarily large, while TFS can only stack two file systems.

If I had time to work on it today, I'd probably go for a mixed kernel/user space approach: do all the bookkeeping and special cases (device files, named pipes, etc.) in user space, but keep data transfers in the kernel. I'd also investigate into the direction of COW semantics for disk blocks in order to reduce the cost of changing a few bytes of or appending to a "read-only" file.

Sounds like a very nice master's thesis topic for some good Linux hacker ;-)

- Werner

So far nobody has taken the challenge. So, if you're an aspiring kernel hacker, aren't afraid of complexity, have a lot of time, and are looking for an interesting but useful project, you may just have found it :-)

Werner Almesberger, 3-MAR-1998