tytso / e2fsprogs

Ext2/3/4 file system utilities
http://ext4.wiki.kernel.org
373 stars 219 forks source link

Fix filesystems larger than 2GB on Windows #140

Closed steffen-kiess closed 4 months ago

steffen-kiess commented 1 year ago

SetFilePointer requires the upper 32 bit of the position to be passed separately, which the code did not do, causing the position to be interpreted as a 32-bit value. Use SetFilePointerEx instead and pass the entire 64-bit value.

This fixes a problem where I was getting Inode checksum does not match inode errors on Windows (using mingw) for me. (The error happens when the code is reading the wrong location on the partition.)

steffen-kiess commented 1 year ago

Two requests about the commit description. The first is to add a prefix "libext2fs: " to the first line. (Take a look at the other commits and you'll see the general convention that gets used.) The other is to add a "Signed-off-by". That has a specific legal meaning, which is documented here[1].

Thank you for the feedback. I've updated the pull request.