(original) (raw)

If you are still interested, this is the latest patch: https://reviews.llvm.org/D39464

With this patch, disk blocks are preallocated using fallocate (Linux), posix\_fallocate (other Unices), or fcntl (macOS) before mmap'ing it. If an operating system or a filesystem don't support fallocate or equivalent, it uses an in-memory buffer instead so that a disk full error can be detected on FileOutputBuffer::commit().

On Mon, Nov 6, 2017 at 10:03 AM, Ed Maste <emaste@freebsd.org> wrote:
On 31 October 2017 at 11:02, Rui Ueyama <ruiu@google.com> wrote:
\> Does FreeBSD have fallocate(2) or equivalent?

FreeBSD has posix\_fallocate; we do not have fallocate or fcntl(fd,
F\_PREALLOCATE, ...).