Background: as part of trying to ensure complete coverage in my unit tests, I'm stress-testing some overflow checks.
So, I tried to create a 16 EiB sparse file.
However, on Linux/Btrfs this seems to fail at 8 EiB (2^63 bytes) rather than 16 EiB (2^64 bytes), likely because off_t
is signed.
Is there any OS/filesystem combo which actually, rather than theoretically, allows creating such files?
(-1 omitted in each of the numbers above)
This works:
dd if=/dev/zero of=sparse_file bs=1 count=0 seek=9223372036854775807
This fails:
dd if=/dev/zero of=sparse_file bs=1 count=0 seek=9223372036854775808