[BUG] Journal operations lack durable ordering and split atomic commits #17

Closed
opened 2026-10-02 02:41:13 +02:00 by erikinkinen · 1 comment
Owner

Summary

The JBD2 writer commits descriptor-sized chunks separately and omits durability barriers around journal publication, checkpointing and recovery. A storage interruption can therefore expose part of one filesystem operation.

Reproduction

At the original source, inspect write_internal_journal_transactions and write_internal_journal_transaction_chunk. An operation larger than one descriptor receives several transaction identities and commits. The surrounding writer and recovery paths do not flush their held device routes.

Expected and actual behavior

Keep one transaction identity and one commit for the complete operation. Persist descriptors and data before the commit, persist home blocks before retiring the journal, and preserve the original filesystem/internal-or-external-journal selection. Refuse unsupported durability before effects and retain fail-stop custody after uncertainty.

The original source splits commits and has no barriers. Read-after-write checks cannot establish persistence.

Environment and identity

  • Journaled ext through original filesystem and selected journal routes.
  • Source-derived defect; no hardware, power-loss or guest-image result is inferred.
  • No known working revision has been established.

Evidence and prior checks

The JBD2 specification defines transaction publication. Independent volatile/stable media controls must cover chained descriptors, original routes, lost completions, partial checkpoints, checksum dialects, revocation and full/fast-recovery storage reuse.

Tracking

The fix is implemented in #45. Compatibility persistence and release-image acceptance remain tracked in Posixd #28.

## Summary The JBD2 writer commits descriptor-sized chunks separately and omits durability barriers around journal publication, checkpointing and recovery. A storage interruption can therefore expose part of one filesystem operation. ## Reproduction At [the original source](https://git.erikinkinen.fi/erix/e2fsd/commit/83ad860c308e7f35e2ea175c4a7a816f78c5434c), inspect `write_internal_journal_transactions` and `write_internal_journal_transaction_chunk`. An operation larger than one descriptor receives several transaction identities and commits. The surrounding writer and recovery paths do not flush their held device routes. ## Expected and actual behavior Keep one transaction identity and one commit for the complete operation. Persist descriptors and data before the commit, persist home blocks before retiring the journal, and preserve the original filesystem/internal-or-external-journal selection. Refuse unsupported durability before effects and retain fail-stop custody after uncertainty. The original source splits commits and has no barriers. Read-after-write checks cannot establish persistence. ## Environment and identity - Journaled ext through original filesystem and selected journal routes. - Source-derived defect; no hardware, power-loss or guest-image result is inferred. - No known working revision has been established. ## Evidence and prior checks The [JBD2 specification](https://www.kernel.org/doc/html/latest/filesystems/ext4/journal.html) defines transaction publication. Independent volatile/stable media controls must cover chained descriptors, original routes, lost completions, partial checkpoints, checksum dialects, revocation and full/fast-recovery storage reuse. ## Tracking The fix is implemented in #45. Compatibility persistence and release-image acceptance remain tracked in [Posixd #28](https://git.erikinkinen.fi/erix/posixd/issues/28).
erikinkinen 2026-10-02 02:41:13 +02:00
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:47 +01:00
Author
Owner

The fix is ready for review in #45 at ec9d6a85. Multi-descriptor writes now have one commit, and the original filesystem/journal barriers surround publication, checkpoint and recovery retirement. Independent controls also prevent a callback from hiding a failed staged member and committing an earlier prefix. Current CI passes the 515-test component suite. Hardware power-loss and release-image acceptance remain separate.

The fix is ready for review in #45 at `ec9d6a85`. Multi-descriptor writes now have one commit, and the original filesystem/journal barriers surround publication, checkpoint and recovery retirement. Independent controls also prevent a callback from hiding a failed staged member and committing an earlier prefix. [Current CI](https://git.erikinkinen.fi/erix/e2fsd/actions/runs/689) passes the 515-test component suite. Hardware power-loss and release-image acceptance remain separate.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/e2fsd#17
No description provided.