Re: Soft metadata updates paper w/code

Theodore Y. Ts'o (tytso@MIT.EDU)
Tue, 22 Jul 1997 16:42:15 -0400


Date: Mon, 21 Jul 97 20:14:11 MDT
From: colin@nyx.net (Colin Plumb)

Looking at reiserfs, I found a University of Michigan tech report
on "soft updates" a technique to remove all synchronous writes
from a file system yet maintain fsck-less crashes.

I've looked at the tech report. It's pretty clever. The basic idea is
that when you write out a block which has unsatisified dependencies, you
temporarily *undo* the changes, and then write the block out to disk,
thus guaranteeing the on-disk copy is consistent.

The report talks about undoing changes and then redoing them after the
write succeeds, so I assume that during the duration of the write,
access to that disk block is locked out. This could be a contention
issue for heavily accessed directories (like /tmp) or block bitmaps.

The alternative approach would be to copy the block to scratch space and
modify the scratch copy, and then let the device driver write that out
to disk.

Either way, it requires pretty extensive changes and support all over
the block device interface, and (perhaps) the generic filesystem layer.
But the general approach is certainly worth keeping in mind. (Which is
another way of saying I don't have time to rush out and implement it
right now; maybe later.)

- Ted