The documentation for stat explicitly says that st_blocks is with 512 byte blocks, and it appears that this is independent from st_blksize, which indicates 'the "preferred" block size for efficient filesystem I/O.' I think the current implementation is correct.
The documentation for stat explicitly says that
st_blocks
is with 512 byte blocks, and it appears that this is independent fromst_blksize
, which indicates 'the "preferred" block size for efficient filesystem I/O.' I think the current implementation is correct.