[PATCH] Use posix_fallocate instead of ftruncate.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 11:52:26 PDT 2016


On 19 July 2016 at 14:31, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
> On 19 July 2016 at 13:11, Rui Ueyama <ruiu at google.com> wrote:
>> I have a concern about this change when it is used on a filesystem that
>> doesn't support file pre-allocation. The function should work on a
>> filesystem that doesn't support an underlying fallocate(-ish) system call,
>> but in that case I believe it tries to actually write data to force
>> allocation. In that case it'd be slow.
>
> It still seems better than crashing, no?
>
> Which filesystems do you have in mind? I have a spare partition, so I
> should be able to test pretty much anything that linux supports. I
> will give HFS+ a try on OS X too.


OS X is missing posix_fallocate :-(

I am looking for an alternative.

Cheers,
Rafael


More information about the llvm-commits mailing list