diff options
author | Lukas Czerner | 2014-04-02 13:31:05 +0200 |
---|---|---|
committer | Karel Zak | 2014-04-18 12:49:42 +0200 |
commit | 1fd4f609ee65be0f376ed28322fc3593026d39e4 (patch) | |
tree | 2ded346929415bd4cc1f4d6be500b2505c6eae61 /sys-utils/fallocate.1 | |
parent | fallocate: introduce an option -c to support COLLAPSE_RANGE (diff) | |
download | kernel-qcow2-util-linux-1fd4f609ee65be0f376ed28322fc3593026d39e4.tar.gz kernel-qcow2-util-linux-1fd4f609ee65be0f376ed28322fc3593026d39e4.tar.xz kernel-qcow2-util-linux-1fd4f609ee65be0f376ed28322fc3593026d39e4.zip |
fallocate: add FALLOC_FL_ZERO_RANGE support
Recent Linux kernel supports FALLOC_FL_ZERO_RANGE in fallocate(2).
This patch adds FALLOC_FL_ZERO_RANGE support to fallocate utility,
by introducing a new option -z|--zero-range.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Diffstat (limited to 'sys-utils/fallocate.1')
-rw-r--r-- | sys-utils/fallocate.1 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys-utils/fallocate.1 b/sys-utils/fallocate.1 index 634c595b4..1177cf389 100644 --- a/sys-utils/fallocate.1 +++ b/sys-utils/fallocate.1 @@ -7,6 +7,7 @@ fallocate \- preallocate or deallocate space to a file .RB [ \-n ] .RB [ \-p ] .RB [ \-c ] +.RB [ \-z ] .RB [ \-o .IR offset ] .B \-l @@ -46,6 +47,9 @@ Do not modify the apparent length of the file. This may effectively allocate blocks past EOF, which can be removed with a truncate. .IP "\fB\-p, \-\-punch-hole\fP" Punch holes in the file, the range should not exceed the length of the file. +This option may not be specified at the same time as the +.B \-z +option. .IP "\fB\-d, \-\-dig-holes\fP" Detect and dig holes. Makes the file sparse in-place, without using extra disk space. The minimal size of the hole depends on filesystem I/O block size @@ -61,6 +65,16 @@ Collapse a particular file range to nullify the hole. Extents beyond the range command does not leave a hole, while \fI\-\-punch-hole\fP leaves a hole instead of shifting extents. Both offset and length should be aligned to the block size of filesystem. +.IP "\fB\-z, \-\-zero-range\fP" +Zero range in the file. Regions that span holes in the file will be +preallocated, this includes areas past EOF. Option +.B \-n +can be specified to prevent file length modification. Reads from the range +will return zeros. This option may not be specified at the same time as the +.B \-p +or +.B \-c +option. .IP "\fB\-o, \-\-offset\fP \fIoffset\fP Specifies the beginning offset of the allocation, in bytes. .IP "\fB\-l, \-\-length\fP \fIlength\fP |