Lecture: crash consistency

All File Systems Are Not Created Equal: On the Complexity of Crafting Crash-Consistent Applications, OSDI 2014

Question

In Figure 4(A)(i), “LevelDB compaction,” why is there an arrow from rename(tmp, current) to unlink(mani-old)? Specifically, what happens if the two operations get reordered?

Note that “CURRENT is a simple text file that contains the name of the latest MANIFEST file” - check LevelDB’s format if you are interested.

Question

Consider the follow program for updating a file on POSIX systems:

open(name, O_CREAT | O_TRUNC, 0666);
write();
close();

One may argue that this is unsafe and we should do something like this instead:

creat(tmp, ...);
write();
fsync();
rename(tmp, name);

Based on what you have read in this paper, do you agree? Briely explain why or why not. Free free to propose your own solutions.

Question

What kind of vulnerabilities does ALICE focus on detecting? Give one example that ALICE can detect and one that it cannot detect. How do you think Alice can help with future file-system design (e.g., Section 4.6)?

Question

Provide a list of questions you would like to discuss in class. Feel free to provide any comments on the paper and related topics (e.g., which parts you like and which parts you find confusing).