1. Crash Consistency

Initial file system, one file, one block: B[v1], I[v1], Da

Data block Db appended, requires 3 writes: B[v2], I[v2], Db

Crash Scenarios:

  1. B[v2] written, but not I[v2] and Db

  2. I[v2] written, but not B[v2] and Db

  3. Db written, but not B[v2] and I[v2]

  4. B[v2] and I[v2] written, but not Db

  5. I[v2] and Db written, but not B[v2]

  6. B[v2] and Db written, but not I[v2]

Which leave file system inconsistent?

How to fix?