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() |
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
