Skip to content

Remove the unreachable partial last block group handling in the EXT4 formatter - #640

Merged
wlan0 merged 2 commits into
apple:mainfrom
dkovba:last-group
Apr 4, 2026
Merged

Remove the unreachable partial last block group handling in the EXT4 formatter#640
wlan0 merged 2 commits into
apple:mainfrom
dkovba:last-group

Conversation

@dkovba

@dkovbadkovba commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Removes the unreachable partial last block group handling in the EXT4 formatter.

@dkovba
dkovba requested a review from wlan0April 3, 2026 05:16
Comment threadSources/ContainerizationEXT4/EXT4+Formatter.swift
@wlan0

wlan0 commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

If the goal is to support a partial final group, the local bitmap change is not the whole story.

The special case adjusts the last group bitmap and its freeBlocksCountLow via blocksInGroup, but later the superblock still derives blocksCount from totalGroups * self.blocksPerGroup and totalFreeBlocks from blocksCount - totalBlocks.

In the used-group path, freeBlocks is computed and then not used. So if this partial-group path ever becomes reachable, the bitmap-level view and the global free-space counters could still differ.

@dkovba
dkovba requested a review from wlan0April 3, 2026 23:28
@dkovbadkovba changed the title Fix the last block group handling in the EXT4 formatterRemove the unreachable partial last block group handling in the EXT4 formatterApr 3, 2026
@wlan0
wlan0 merged commit 33afe99 into apple:mainApr 4, 2026
3 checks passed
@dkovba
dkovba deleted the last-group branch April 4, 2026 02:10
Sign up for freeto 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.

2 participants

@dkovba@wlan0