Module Linux_ext.Fallocate

module Flags : sig ... end
val fallocate : (Core_unix.File_descr.t -> mode:Flags.t -> offset:int -> size:int -> unit) Core.Or_error.t

From man 2 fallocate:

fallocate() allows the caller to directly manipulate the allocated disk space for the file referred to by fd for the byte range starting at offset and continuing for size bytes.

The mode argument determines the operation to be performed on the given range.