Block One Thousand Twice
Metadata journaling is in use, so directory contents are journaled (directories are metadata) but regular file data is not. This sequence happens:
- A file is created inside directory
foo, whose data block lives at block 1000. Transaction 1 journalsI[foo]andD[foo]with final address 1000. - The user deletes everything in
fooand thenfooitself. Block 1000 is freed. - The user creates a regular file
bar. The allocator hands it block 1000. Transaction 2 journals onlyI[bar];bar's bytes are written straight to block 1000. - Power is cut before either transaction has been checkpointed out of the journal.
A naive recovery replays every committed transaction in order. What goes wrong, and what does ext3 do about it?
Sign in to answer questions and track your progress
Sign In