Questions: Crash Consistency and Journaling File Systems

4 questions to test your understanding

Score: 0 / 4
Question 1 Multiple Choice

To append a block to a file, a file system must write a new data block, update the inode to point to it, and mark the block as used in the data bitmap. Suppose a crash occurs after the inode write reaches the disk but before the bitmap write. What is the problem after reboot?

AThere is no problem; the file is complete
BThe inode points to a block that the bitmap says is free, so the block could later be given to another file
CThe bitmap says a block is used, but no inode points to it, so the block is leaked
DThe file's old contents are erased
Question 2 Multiple Choice

In a journaling file system, at what point is a transaction considered committed, so that recovery will replay it?

AWhen the transaction-begin block is written to the journal
BWhen the first metadata block is written to the journal
CWhen the transaction-end (commit) block has been written to the journal after the rest of the transaction
DWhen all blocks have been written to their final locations on disk
Question 3 True / False

Journaling improves crash recovery partly because it writes each journaled metadata block to disk only once.

TTrue
FFalse
Question 4 Short Answer

Why is recovery with a journal usually much faster than running fsck on a large disk?

Think about your answer, then reveal below.