mirror of https://github.com/mkerrisk/man-pages
fallocate.2: Document FALLOC_FL_PUNCH_HOLE
FALLOC_FL_PUNCH_HOLE was added in Linux 2.6.38, for punching holes in the allocated space in a file. Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
74819bb2b8
commit
1c7857e9dd
|
@ -2,8 +2,6 @@
|
|||
.\" Written by Dave Chinner <dgc@sgi.com>
|
||||
.\" May be distributed as per GNU General Public License version 2.
|
||||
.\"
|
||||
.\" FIXME: Linux 2.6.38 added FALLOC_FL_PUNCH_HOLE
|
||||
.\"
|
||||
.TH FALLOCATE 2 2011-09-19 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
fallocate \- manipulate file space
|
||||
|
@ -34,7 +32,7 @@ bytes.
|
|||
The
|
||||
.I mode
|
||||
argument determines the operation to be performed on the given range.
|
||||
Currently only one flag is supported for
|
||||
The following flag values are supported for
|
||||
.IR mode :
|
||||
.TP
|
||||
.B FALLOC_FL_KEEP_SIZE
|
||||
|
@ -61,6 +59,26 @@ even if it is less than
|
|||
.\" All of the above flags were debated upon and we can not say
|
||||
.\" if any/which one of these flags will make it to the later kernels.
|
||||
.PP
|
||||
.TP
|
||||
.BR FALLOC_FL_PUNCH_HOLE " (since Linux 2.6.38)"
|
||||
Deallocate space inside a file in the byte range starting at
|
||||
.I offset
|
||||
and continuing for
|
||||
.I len
|
||||
bytes.
|
||||
Partial filesystem blocks are zeroed, and
|
||||
whole filesystem blocks are removed from the file.
|
||||
Currently, you can only have
|
||||
.BR FALLOC_FL_PUNCH_HOLE
|
||||
with
|
||||
.BR FALLOC_FL_KEEP_SIZE
|
||||
set,
|
||||
so the file size (as reported by
|
||||
.BR stat (2))
|
||||
does not change
|
||||
when hole punching, even when punching the end of
|
||||
a file off.
|
||||
.PP
|
||||
If
|
||||
.B FALLOC_FL_KEEP_SIZE
|
||||
flag is not specified in
|
||||
|
|
Loading…
Reference in New Issue