You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
st_blocks appears to be always defined as 512 on Linux. st_blksize is the prefered IO size, but unrelated to the underlaying storage size. As the preferred IO size may be reported as 4096, this results in 8 times larger file size. This is exactly what I am seeing right now, while using fileAllocatedSizeKey.
I am unsure if other platforms may use st_blksize to report a different storage block size.
Let me know if I should submit a PR
The text was updated successfully, but these errors were encountered:
Hi,
The allocated file size using
fileAllocatedSizeKey
is wrongly calculated for linux.Current implementation:
Proposed implementation:
st_blocks
appears to be always defined as 512 on Linux.st_blksize
is the prefered IO size, but unrelated to the underlaying storage size. As the preferred IO size may be reported as 4096, this results in 8 times larger file size. This is exactly what I am seeing right now, while usingfileAllocatedSizeKey
.I am unsure if other platforms may use
st_blksize
to report a different storage block size.Let me know if I should submit a PR
The text was updated successfully, but these errors were encountered: