Crash Recovery and the Log
This lesson discusses how LFS handles system crashes.
We'll cover the following...
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 ...