Journaling file system
A journaling file system allows for quick file system recovery after a crash occurs by logging the metadata of files.
By enabling file system logging, the system records every change in the metadata of the file into a reserved area of the file system. The actual write operations are performed after the logging of changes to the metadata has been completed.
- Data write: Write data to final location; wait for completion (the wait is optional; see below for details).
- Journal metadata write: Write the begin block and metadata to the log; wait for writes to complete.
- Journal commit: Write the transaction commit block (containing TxE) to the log; wait for write to complete; transaction is said to be committed.
- Checkpoint: Write the contents of the update (metadata and data) to their final on-disk locations.
- Free: Some time later, mark the transaction free in the journal by updating the journal superblock.