Re: Log structured filesystem (off-topic)

Adam J. Richter (adam@yggdrasil.com)
Sat, 31 Jan 1998 08:22:03 -0800


andi@aluf.technion.ac.il writes:
>Has anyone thought about making a log structured file system for Linux?
>Has any work been done on this subject?

Yes. There have been nonfunctional snapshots of a compressed log
structured filesystem in the Summer 1994, Fall 1994 and Fall 1995
editions of Yggdrasil Plug & Play Linux. This code has been updated
to compile and maybe even load under the 2.0.33 kernel, although it
is basically non-functional.

You can get a snapshot of the enhanced 2.0.33 kernel from
ftp://ftp.yggdrasil.com/private/adam/linux-2.0.33.ygg.tar.gz, and also
the source to a simple make filesystem program in the same directory
(the file name is mklogfs.c).

This log structured filesystem code requires changes in the
kernel so that the buffer cache can cache essentially anything for
which it is given read and write operations and can be identified can
be keyed by driver, device ID and block number. You need a mechanism
like this to implement a log structured filesystem. The last time I
looked at the "page cache" mechanism in the kernel, it was not
sufficient for this task, because it did not have the capability to
select and write out dirty buffers on its own. I sent patches to
Linus a few years ago to do this, but, at this point, they have not
been integrated into any of his kernel releases.

Every now and then I do dust off the log filesystem code. The
last time I did that, I started writing some code to use btrees
instead of indirect pointers and indirect blocks, but then put it down
and went to work on something else.

Anyhow, you should definitely have a look at it. I believe
that that code is the proper starting place for the next a generation
file system for Linux.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 205
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."