CS FundamentalsVery hardGATE CS

A journaling file system in ORDERED mode (like ext4's default) is used. Which statement about a crash is correct?

  1. A. Both data and metadata are always written twice, so no data written before the crash is lost
  2. B. Nothing is journaled; fsck must scan the whole disk
  3. C. Only data blocks are journaled; directory structure may be corrupted
  4. D. Metadata is journaled and data blocks are written before the metadata commit, so after recovery files never point to garbage blocks

Correct answer: D. Metadata is journaled and data blocks are written before the metadata commit, so after recovery files never point to garbage blocks

Ordered mode journals only metadata but forces the file's data to disk before the metadata transaction commits. Recent writes may be lost, but metadata never references uninitialised blocks. Full data journaling writes data twice.

More Operating Systems questions

Exams that ask this topic