|
NAMEposix_fallocate —
pre-allocate storage for a range in a file
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <fcntl.h>
int
DESCRIPTIONRequired storage for the range offset to offset + len in the file referenced by fd is guaranteed to be allocated upon successful return. That is, ifposix_fallocate ()
returns successfully, subsequent writes to the specified file data will not
fail due to lack of free space on the file system storage media. Any existing
file data in the specified range is unmodified. If offset
+ len is beyond the current file size, then
posix_fallocate () will adjust the file size to
offset + len. Otherwise, the file
size will not be changed.
Space allocated by RETURN VALUESIf successful,posix_fallocate () returns zero. It
returns an error on failure, without setting errno.
ERRORSPossible failure conditions:
SEE ALSOcreat(2), ftruncate(2), open(2), unlink(2)STANDARDSTheposix_fallocate () system call conforms to
IEEE Std 1003.1-2004 (“POSIX.1”).
HISTORYTheposix_fallocate () function appeared in
FreeBSD 9.0.
AUTHORSposix_fallocate () and this manual page were initially
written by Matthew Fleming
<mdf@FreeBSD.org>.
Visit the GSP FreeBSD Man Page Interface. |