Punching holes in files
In particular, this patch adds a new flag (FALLOC_FL_PUNCH_HOLE)
which is recognized by the system call. If the underlying filesystem is
able to perform the operation, the indicated range of data will be removed
from the file; otherwise ENOTSUPP will be returned. The current
implementation will not change the size of the file; if the final blocks of
the file are "punched" out, the file will retain the same length. There
has been some discussion of whether changing the size of the file should be
supported, but the consensus seems to be
that, for now, changing the file size would create more problems than it
would solve.
| Index entries for this article | |
|---|---|
| Kernel | fallocate() |
