PerlFS Home Page
PerlFS is a combination of a Linux kernel module and some Perl scripts which allow to write filesystems in Perl. It currently works with Linux kernel 2.2 or 2.4; it will also work under most 2.3 kernels, but official 2.3 support has been discontinued now that 2.4 is out. Support for 2.5 kernels will be added as soon as possible after development starts. There is the possibility of support for PerlFS under Plan9 and NetBSD 4.0 in the not-too-far future, as I've installed these two operating systems on my test machines. Plan9 support, at least, looks extremely easy to add. Support for other operating systems might follow.
Because I wanted to write a filesystem. And I found out that it was just as difficult to write a generic module supporting any number of filesystems, and do the real work in Perl. And of course this means that the filesystem will work unchanged under all the supported operating systems.
Another advantage is that if the filesystem has bugs, you get an error message instead of a kernel panic. Of course, if the kernel module has bugs you are in no better place than writing the filesystem in C in the first place; however, since the kernel module is shared by all the filesystems, the chances of finding the bugs are much higher.
Of course there are disadvantages. PerlFS-0.08 relies on a character device to communicate with its userland (perl) counterpart. This introduces overheads. There are many tunable options which allow to reduce these overhead, but unless you want to spend days constantly changing them and timing all the operations the defaults are probably the right choice.
Speaking of speed, the filesystems are written as objects in Perl, and this isn't the fastest thing. However, many people have been writing filesystems which depend on network accesses and/or slow hardware, and the extra overhead is not going to even be noticed.
Why did I not use any of the other filesystems which allow various levels of interaction with Perl? Because they weren't there when I released PerlFS 0.01 (in fact, they still weren't there when I released 0.04...)
Why did I not write it as a Perl NFS server? Because the NFS protocol is not flexible enough for some of the applications we planned.
This software is copyright (C) 2001 Claudio Calvelli
Please refer to the file LICENSE for important licensing information (GPL v2). By installing the software you agree to be bound by the license agreement. By running the tests you also agree to be bound by the license agreement.