CS 111 Spring 2012

Lecture 13: File System Robustness

by Junda Zhu for a lecture by Professor Paul Eggert on May 17, 2012 at UCLA

Table of Contents

  1. What can go wrong with file systems?
  2. Approaches to Building Reliability
  3. What are the Bad Events?
  4. Lecture Focus - Loss of Power
    1. Approach 1 & 2
    2. Consistency & Some Impractical Approaches
    3. Commit Record
    4. Journaling
  5. Golden Rule of Atomicity
  6. Lampson-Sturgis Assumptions

What can go wrong with file systems?

In this lecture, we will handle the topic of file system robustness. To understand the robustness for file systems, we will first look at some common problems we will encounter.
Back to Contents

Approaches to Building Reliability


Back to Contents

What are the Bad Events?


Back to Contents

Lecture Focus - Loss of Power

(A) Approach 1 & 2


Back to Contents

(B) Consistency & Some Impractical Approaches


Back to Contents

(C) Commit Record

We want something faster than the previous method, commit record does the job.
Back to Contents

(D) Journaling

Another method that works well.

Journaling Example:



	rename("d/f", "e/g");
        + get f inode into RAM
        + get d inode into RAM
        + get d data
        + get e inode
        + get e data
        + update d data in RAM
        + update e data in RAM
        + write f inode with link count = 2
        + write e data
        + write d data
        + write f inode with link count = 1


Back to Contents

Golden Rule of Atomicity

Never overwrite your only copy unless your underlying write operation is known to be atomic * If not, either not perform an operation or do an operation in its entirety

Lampson-Sturgis Assumptions







Back to Contents


This document is fully HTML 4.01 compliant: Valid HTML 4.01 Strict