Skip to content

Enable uninit_bg (gdt_csum) in ext4 mkfs for fast offline resize - #18

Merged
adam-rl merged 1 commit into
mainfrom
adam/ext4-uninit-bg
Jul 23, 2026
Merged

Enable uninit_bg (gdt_csum) in ext4 mkfs for fast offline resize#18
adam-rl merged 1 commit into
mainfrom
adam/ext4-uninit-bg

Conversation

@adam-rl

@adam-rl adam-rl commented Jul 23, 2026

Copy link
Copy Markdown

Patch Photon's do_mkfs to set the ext4 gdt_csum (uninitialized block groups) feature on the base layer. A guest-side offline resize2fs grow of a devbox rootfs then marks new inode tables uninitialized instead of zeroing them — a near-instant, metadata-only grow into the layered (COW) block format instead of writing gigabytes of zeros.

metadata_csum is deliberately not used: it seeds checksums from s_uuid, which do_mkfs sets after ext2fs_initialize caches the seed, producing an invalid superblock checksum. gdt_csum has no such ordering dependency.

Applied to PhotonLibOS v0.6.17 via a CMake FetchContent PATCH_COMMAND in Findphoton.cmake (idempotent reverse-check).

Released as tag v0.0.11-runloop; consumed by the runloopai/iac blueprint builder images (v0.9.5).

Patch Photon's do_mkfs to set the gdt_csum feature (uninitialized block
groups) on the base ext4 layer. An offline resize2fs grow of a devbox
rootfs then marks the new inode tables uninitialized instead of zeroing
them — a near-instant grow that writes only metadata into the layered
(COW) block format instead of gigabytes of zeros.

metadata_csum is deliberately not used: it seeds checksums from s_uuid,
which do_mkfs sets after ext2fs_initialize caches the seed, producing an
invalid superblock checksum. gdt_csum has no such ordering dependency.

Applied to PhotonLibOS v0.6.17 via a CMake FetchContent PATCH_COMMAND in
Findphoton.cmake (idempotent reverse-check).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@adam-rl
adam-rl merged commit 4f9c8b1 into main Jul 23, 2026
6 of 19 checks passed
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.

1 participant