Skip to content

Adds journal modes to EXT4.Formatter.#689

Open
jglogan wants to merge 10 commits intoapple:mainfrom
jglogan:ext4-journal-2
Open

Adds journal modes to EXT4.Formatter.#689
jglogan wants to merge 10 commits intoapple:mainfrom
jglogan:ext4-journal-2

Conversation

@jglogan
Copy link
Copy Markdown
Contributor

@jglogan jglogan commented Apr 18, 2026

  • Closes [Request]: ContainerizationEXT4: support journal modes #671.
  • Adds optional journal parameter to EXT4.Formatter.init(), with nil default specifying the current no-journal filesystem configuration. Otherwise the parameter value contains the journal size and mode.
  • minDiskSize parameter for formatter init specifies the minimum usable capacity of the resulting filesystem. The resulting disk image grows past this value to accommodate the filesystem on-disk structures, including the journal if specified.

@jglogan jglogan force-pushed the ext4-journal-2 branch 4 times, most recently from d8e799b to 61c99aa Compare April 18, 2026 23:10
jglogan added 10 commits April 19, 2026 11:08
- Set journal backup type.
- Trailing comment after superblock setup listing
  fields we implictly left zero.
- Enforce minimum journal size of 1024
  blocks (`EXT4_MIN_JOURNAL_BLOCKS`).
- Fix byte ordering of `i_size` and `i_size_hi`
  in the s_jnl_blocks.
- The journal construction previously consumed bytes from
  the caller's `minDiskSize` value. `close()` now stashes
  the reserved GDT block count based on the pre-journal
  total block count, and then initializes the journal and
  increases the total accordingly.
- Eliminates now-inapplicable "journal too large" checks.
- Ensure that block count will fit UInt32 in formatter
  `init()` and `close()`.
- Add readback validation to journaled filesystem unit tests.
- Add readback check and volume mount for journaled
  filesystem integration tests.
- PR feedback - clarify JBD2 endianness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request]: ContainerizationEXT4: support journal modes

1 participant