Uh oh!
There was an error while loading. Please reload this page.
Fix EXT4 extent offset double-counting causing block address overflow - #462
Fix EXT4 extent offset double-counting causing block address overflow#462Ronitsabhaya75 wants to merge 3 commits into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
dcantah
commented
Dec 31, 2025
@Ronitsabhaya75 This does look wrong, but do you actually see this fixes these warnings? I remember trialing a very similar fix a week or so ago and didn't seem like much changed. I haven't had much time to dig back in |
Ronitsabhaya75
commented
Dec 31, 2025
@dcantah I haven't been able to test it yet because I'm on macOS 15.6 and the project requires macOS 26+. However, I'm confident this is the root cause based on the math: The bug: Line 1137 passes extentStart =(blocks.start + offset)+(offset + i * MaxBlocksPerExtent)= blocks.start +2*offset +...For extent block iteration 5231: offset = 856,842,240 Double-counted: extentStart = 1,713,685,480 (matches the 1,710,731,624 error!) Filesystem max: 134,217,728 blocks (way exceeded!) |
The math I agree with, I just vaguely remember still seeing these warnings even with a similar (possibly the exact same) fix. I'll give it a whirl |
Ronitsabhaya75
commented
Dec 31, 2025
for sure Um we can test it and check if there are warnings i can have deeper look into it. thank you @dcantah for reviewing |
jglogan
commented
Jan 2, 2026
@Ronitsabhaya75 I tried the following
I'm still seeing warning messages like: |
Ronitsabhaya75
commented
Jan 2, 2026
so I think there is different issue I'll have deeoper look into it thank you for testing it out @jglogan |
Ronitsabhaya75
commented
Jan 2, 2026
@jglogan if this didnt work i was thinking: The problem is in how For example, in a large file: start = 100,000 do you think this would be another problem for the issue? |
* Removes a double-counted offset in large files. * This is the same fix as was suggested previously in #462. Co-authored-by: Ronit Sabhaya <ronitsabhaya75@gmail.com>
Closes#441
current behavior:
EXT4 filesystem corruption occurs when creating large files in containers, causing block addresses to exceed maximum inode values. This results in errors like:
EXT4-fs warning (device vdb): ext4_block_to_path:105: block 1710731624 > max in inode 21209237The fix:
Remove the pre-added offset. Connect to the correct block address immediately by passing blocks.start directly, allowing offset to be applied once inside
fillExtents. This ensures block addresses remain within filesystem bounds for files of any size.