Improve get_free_diskspace to be able to handle huge disks (#9158) master
authorAdrian Müller <adrian.mueller@intra2net.com>
Fri, 23 Jan 2026 11:12:18 +0000 (12:12 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 23 Jan 2026 13:41:28 +0000 (14:41 +0100)
commit6cb5872856e1f57aa648a027d7fc9b53397a0e5b
tree37dcd89326af4cf3ad0367d2608c29fc3e85f230
parente9cd52d66622f09642d5ddc7c976662e2e60b456
Improve get_free_diskspace to be able to handle huge disks (#9158)

A machine with a 20TB HDD failed the statvfs() call on /datastore
due to an overflow in the statvfs call (verified via strace).
We now use the 64 bit version "statvfs64" to fix the issue.

The returned "long long" of I2n::get_free_diskspace() is already 64 bit,
so it can handle sizes up to ~ 8.39 million TiB.
src/filefunc.cpp