Skip to content

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

Merged
wlan0 merged 2 commits intoapple: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 intoapple:mainfrom
dkovba:last-group

Conversation

@dkovba
Copy link
Copy Markdown
Contributor

@dkovba dkovba commented Apr 3, 2026

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

@dkovba dkovba requested a review from wlan0 April 3, 2026 05:16
@wlan0
Copy link
Copy Markdown
Contributor

wlan0 commented Apr 3, 2026

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 wlan0 April 3, 2026 23:28
@dkovba dkovba changed the title Fix the last block group handling in the EXT4 formatter Remove the unreachable partial last block group handling in the EXT4 formatter Apr 3, 2026
@wlan0 wlan0 merged commit 33afe99 into apple:main Apr 4, 2026
3 checks passed
@dkovba dkovba deleted the last-group branch April 4, 2026 02:10
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.

2 participants