Enable uninit_bg (gdt_csum) in ext4 mkfs for fast offline resize - #18
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch Photon's
do_mkfsto set the ext4gdt_csum(uninitialized block groups) feature on the base layer. A guest-side offlineresize2fsgrow 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_csumis deliberately not used: it seeds checksums froms_uuid, whichdo_mkfssets afterext2fs_initializecaches the seed, producing an invalid superblock checksum.gdt_csumhas no such ordering dependency.Applied to PhotonLibOS v0.6.17 via a CMake FetchContent
PATCH_COMMANDinFindphoton.cmake(idempotent reverse-check).Released as tag
v0.0.11-runloop; consumed by the runloopai/iac blueprint builder images (v0.9.5).