Journaling

From OSDev Wiki
Jump to: navigation, search

This article is a stub! This page or section is a stub. You can help the wiki by accurately contributing to it.

Journaling filesystems are filesystems that store every change made in part of the filesystem called a journal. These changes are then applied to the main filesystem. These systems are much faster to recover after a forced system shutdown, and are less likely to become corrupted. Some examples of this filesystem are ext3, ext4, and ReiserFS.

Methods

Physical Journals

These are journals that put every single change, or block, in the filesystem into the journal. This provides the utmost protection against forced shutdown, because the log can either be replayed, and nothing is lost, or if the journal was the one being written to, will have a missing or mismatched checksum, and thus be dropped on remount. This does, of course, take much more time to write to storage, but can be an acceptable trade off when complete peace of mind is desired.

Logical Journals

Instead of writing every block to the journal, a logical journal writes the metadata of every write to the journal. This means that it is much faster than physical journals, but it is more likely to be corrupted. The system will still recover quickly, but this may cause journaled metadata and unjournaled block data to fall out of sync. This will cause block corruption.

Personal tools
Namespaces
Variants
Actions
Navigation
About
Toolbox