We’ve thus far described two options in keeping file system metadata consistent: a lazy approach based on fsck
, and a more active approach known as journaling. However, these are not the only two approaches.
Soft Updates
One such approach, known as Soft Updates, was introduced by Ganger and Patt“Metadata Update Performance in File Systems” by Gregory R. Ganger and Yale N. Patt. OSDI ’94. A clever paper about using careful ordering of writes as the main way to achieve consistency. Implemented later in BSD-based systems.. This approach carefully orders all writes to the file system to ensure that the on-disk structures are never left in an inconsistent state. For example, by writing a pointed-to data block to disk before the inode that points to it, we can ensure that the inode never points to garbage; similar rules can be derived for all the structures of the file system. However, implementing Soft Updates can be a challenge, whereas the journaling layer described above ...