[PATCH] Use posix_fallocate instead of ftruncate.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 10:11:32 PDT 2016


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.

On Tue, Jul 19, 2016 at 10:16 AM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> This also makes lld marginally faster.
>
> Cheers,
> Rafael
>
>
> On 19 July 2016 at 10:06, Rafael EspĂ­ndola <rafael.espindola at gmail.com>
> wrote:
> > This makes sure that space is actually available. With this change
> > running lld on a full file system causes it to exit with
> >
> >  failed to open foo: No space left on device
> >
> > instead of crashing with a sigbus.
> >
> > Cheers,
> > Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160719/9b1214f4/attachment.html>


More information about the llvm-commits mailing list