Advanced Topics in Computer Systems
Lecture 3
Joe Hellerstein & Eric Brewer

UNIX Fast File System and Modern Filesystem Metadata Handling

FFS

First, the original UNIX filesystem:

What are the main issues in the paper?

Block size:

Unorganized Freelist

Locality

Superblock replication

Metadata updates are on key source of FFS seek overhead.

Seltzer, et al

FFS metadata is basically superblock and inodes. At minimum, want to have a valid superblock and valid inodes. How to assure this?

Soft updates postpone the writes, and tracks dependencies (a poset of actions) for subsequent writing. Problem: cyclic dependencies. (Example from paper). Solution: update pages with selected actions as needed ("rollback/roll-forward"). Needed because of update-in-place.

Journaling filesystem basically does WAL-based transactional recovery for metadata. Each cached (metadata) page has a first-update LSN (since paged in) and a last-update LSN. The former allows you to do log truncation: log recs before the oldest first-update LSN in cache can be discarded. The latter helps you ensure the WAL property: before writing back the page, you flush the log up to the last-update LSN. Superblock keeps location of beginning of log, which changes on each flush! (Not the way ARIES works, BTW). "Checkpoint" in this context means flush the log (not like an ARIES checkpoint record.)

Notes:

More on Journaling

A helpful paper on journaling filesystems is Prabhakaran & the Arpaci-Dusseaus' Analysis and Evolution of Journaling File Systems from USENIX '05. It analyzes a number of the systems that are out there. A couple examples (more in the paper):