= File-system journaling mode
Which contents pass through the journal and which persistence dependencies accompany them. The <ext4> documentation distinguishes these modes: <file metadata> and contents both pass through the journal in `data=journal`; only <file metadata> is journaled in `data=ordered`, with associated contents forced to final locations before metadata commit; only <file metadata> is journaled in `data=writeback`, without that data-before-commit dependency.<ext4 General Information by The kernel development community>{ref}
For our append, full data journaling uses the three-record model. Ordered metadata journaling protects $I,B$ in the journal and first persists $D$ directly in free block 9. Before commit, changing an unreferenced free block does not change the visible old <file>; after commit, <journal replay> supplies the new <file metadata> and the new contents are already durable. Without that dependency, recovery can produce correct allocation and size but stale contents in block 9. Ordered metadata journaling does not give general all-or-nothing contents for overwrites of already allocated <file data blocks>, nor does it combine arbitrary application writes into a <file-system transaction>. The choice of protected records determines the scope of the guarantee.
Back to article page