English pages are provided only to compare translations to original pages,
better looking pages can be browsed
at the Linux man-pages official site.
Linux Programmer's Manual (3)
posix_fallocate - allocate file space
int posix_fallocate(int fd, off_t offset, off_t len);
Feature Test Macro Requirements for glibc (see
_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L
ensures that disk space is allocated for the file referred to by the
for the bytes in the range starting at
and continuing for
After a successful call to
subsequent writes to bytes in the specified range are
guaranteed not to fail because of lack of disk space.
If the size of the file is less than
then the file is increased to this size;
otherwise the file size is left unchanged.
returns zero on success, or an error number on failure.
is not set.
is not a valid file descriptor, or is not opened for writing.
exceeds the maximum file size.
was less than 0, or
was less than or equal to 0.
does not refer to a regular file.
There is not enough space left on the device containing the file
referred to by
refers to a pipe.
is available since glibc 2.1.94.
POSIX.1-2008 says that an implementation
was 0, or
was less than 0.
POSIX.1-2001 says that an implementation
is less than 0, or
was less than 0, and
give the error if
This page is part of release 3.66 of the Linux
A description of the project,
information about reporting bugs,
and the latest version of this page,
can be found at
- RETURN VALUE
- CONFORMING TO
- SEE ALSO
This document was created by
using the manual pages.
Time: 21:43:02 GMT, July 12, 2014