Search⌘ K

Crash Recovery and the Log

Explore how log-structured file systems manage crash recovery by using dual checkpoint regions, timestamp validation, and roll forward techniques to restore file system consistency and minimize data loss after crashes.

One final problem: what happens if the system crashes while LFS is writing to disk? As you may recall in the previous chapter about journaling, crashes during updates are tricky for file systems, and thus something LFS must consider as well.

When do crashes happen

During normal operation, LFS buffers write in a segment, and then (when the segment is full, or when some amount of time has elapsed), write the segment to disk. LFS organizes these writes in a log, i.e., the checkpoint region points to a head and tail segment, and each ...