[PATCH] D39464: Define fs::allocate_file which preallocates disk blocks.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 6 13:30:58 PST 2017


Ed Maste via Phabricator <reviews at reviews.llvm.org> writes:
>> Then, there's the matter of quotas.
>> posix_fallocate does not fail even on filesystems that do not support block preallocation.
>
> It can, in 1003.1-2008: `[EINVAL] The len argument is less than zero, or the offset argument is less than zero, or the underlying file system does not support this operation.`

It can, but glibc implementation doesn't. That is unfortunate, but we
have to live with it.

We already have a LLVM_USING_GLIBC, so maybe avoid posix_fallocate only
if it is set?

Cheers,
Rafael


More information about the llvm-commits mailing list