October 2018
Beginner
794 pages
19h 23m
English
Linux provides the posix_fallocate(3) API; its job is to guarantee that sufficient disk space is available for a given range specific to a given file. What that actually means is that whenever the app writes to that file within that range, the write is guaranteed not to fail due to lack of disk space (if it does fail, errno will be set to ENOSPC; that won't happen). It's signature is as follows:
#include <fcntl.h>int posix_fallocate(int fd, off_t offset, off_t len);
Here are some quick points to note regarding this API:
Read now
Unlock full access