[PATCH 4/4] Remove broken posix_fallocate, posix_falllocate64 fallback code [BZ#15661]

Paul Eggert eggert@cs.ucla.edu
Wed May 6 22:48:00 GMT 2015


Florian Weimer wrote:
> Maybe we could remove the write loop and perform only an ftruncate call
> which (hopefully) increases the file size.  This would take care of the
> O_APPEND issue and remove most of the races.

I like this idea.

> Using posix_fallocate to
> avoid ENOSPC later would not work, but with thin provisioning,
> deduplicating storage and compression going around these days, I don't
> think writing zero blocks has that effect in practice anyway

That's right.

> (particularly not on NFS).

It's in draft NFS v4.2 as the ALLOCATE operation; see:

https://tools.ietf.org/html/draft-ietf-nfsv4-minorversion2-38

This is pretty much bleeding-edge of course.



More information about the Libc-alpha mailing list