Soft updates for 2.5?

From: Alex Khripin (akhripin@morgoth.mit.edu)
Date: Sat Jun 30 2001 - 05:41:11 EST


Hi,
There was a discussion in October, 2000, about the Granger and McKusick paper
on soft updates for the BSD FFS. Reading the thread, nothing conclusive seemed
to come out of it.
The paper is available at http://www.pdos.lcs.mit.edu/~ganger/papers/CSE-TR-25
4-95/
The code for the BSD implementation is available there as well.
The general idea of the paper is to prevent filesystem corruption due to
interrupted writes of circular dependencies. The general principle is, that if
there is a circular metadata dependency between two blocks A, and B, caused
by operations C and D, where C requires A to be changed before B, and D,
which comes after C, requires B to be changed after A. This occurs in many
metadata operations. To do this, soft updates undo the operation D in-memory,
making block A' and B', which only have operation C applied to them. Then
A' is written to disk, and then B' is written do disk. The operation is then
redone in memory. Thus, the disk is still consistent, and the in-memory image
is still the same. If the system is interrupted before B is written, there are
minor inconsistencies, like allocated data blocks not belonging to a file, and
an incorrect file size, but no inconsistencies that can cause further
corruption
if untreated. These problems can be fixed quickly without a long fsck.
Soft updates offer a viable alternative to journaling, and require no changes
to the physical filesystem layout.
A soft-update ext2 filesystem can keep more metadata in memory without having
to sync for fear of errors.
This is not intended to replace journaling filesystems, like reiserfs, because
those have optimizations like B-trees, which cannot be implemented on ext2.
However, this would significantly improve the reliability and speed of ext2.
-Alex Khripin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 30 2001 - 21:00:24 EST