a plan for a filesystem
I’ve been thinking and poking at AROS a lot this week, so I have heaps to write about but haven’t had time. I’ll try to find more time today to get it all down. Here’s the first installment.
Recently AROS has obtained a new installer, but its still hamstrung by the fact that we don’t really have a proper filesystem to install AROS onto. We currently have three filesystem options:
- AFS: This is our current default filesystem. Its an implementation of the Amiga Fast File System. Our implementation is buggy and frequently trashes the disk. Even if it did work well, it would suck is it just wasn’t designed for the massive disks we have these days.
- SFS: The so-called Smart File System. We have a port of the open-source release that was made a few years ago. It works well enough, and actually performs and scales nicely if you can get it set up. It still has a few bugs, isn’t really maintained, and most significantly, GRUB has no support for it, so we can’t currently boot from it, meaning that a minimal AFS boot partition is needed, with all that that entails.
- FAT: The newcomer :) Although noone has done it yet, it should be possible to boot from it. Its stable, and GRUB has support for it. Its two failings are that it has no support for Amiga-specific file attributs (eg script and pure) and it doesn’t scale well to massive disks.
So, what to do? We can fix the bugs and stablise the filesystems. We could implement support for SFS in GRUB. We could add extended attributes to FAT, either by making our own incompatible extensions or by using “magic” files. Ultimately though, we’re left maintaining our own filesystems. As disks become larger and larger and new innovations in filesystem design appear, we’re going to be left behind. We’re not filesystem designers. We don’t have enough people to commit resources to it. The best thing we can do in this situation is to steal something :)
I propose taking ext2/ext3(/ext4). Literally taking it - ripping it from the Linux kernel and porting it. Here’s why:
- Its maintained by a bunch of people who actually know something about filesystems.
- It has some advanced features (like journalling, online resizing, etc) and is getting more all the time (see ext4).
- Its superblock and file structures have space for OS-specific data, so we have a place in the filesystem proper to store Amiga-specific attributes without having to fudge it.
- It also has support for arbitrary extended attributes and forks, so file comments and other large metadata will have a home.
- The tools for creating, manipulating and validating filesystems already exist in the form of e2fsprogs, and should port with a minimum of fuss.
- Read/write support is available on the three major operating systems (Linux, Windows and OS X). Of course they won’t know about OS-specific data, but if the defaults are done right it actually won’t make a difference for most files.
- GRUB knows about it, and thus can boot from it.
I’ve done enough research to know that this can work. I have no immediate plans to implement it, but it’ll be something I look at eventually. Of course, if you want to work on it I’m quite happy to help out.