Re: soft-update/async write file systems

Miguel de Icaza (
23 Feb 1998 22:35:48 -0600

> The real problem (and I ran into this while I started looking at trying
> to do metadata logging for ext2fs) is that the Linux block device
> interface is a real disaster right now. It very badly needs to be
> rewritten from scratch. Between the what the high-level SCSI code does
> to re-order and requests for performance reasons, and the fairly adhoc
> block device layer, it's pretty much impossible for the filesystem to
> request or expect any kind of write ordering semantics.

It is easy to do with a hack or two. That is exactly the approach I
am taking, there are some code that uses this right now on the linux
kernel that is checked-in at the gnome cvs repository (
has details on accessing the anon-cvs repository).

The idea is that any modified block instead of getting dirtied is gets
locked and put on a list of "held" blocks. When a transaction is
finished, the corresponding log records are written and once the log
records are all known to have reached the disk, then the lock is
removed from the modified buffer heads and they are actually dirtied.

There are two ways of doing this: a separate kernel thread can use
syncronous writes with respect to the log (and thus known when the log
contents have reached the disk) or using a callback mechanism (by
using the buffer head finished-io callbacks).

best wishes,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to