summaryrefslogtreecommitdiffstats
path: root/sys-utils/fallocate.1
diff options
context:
space:
mode:
authorKarel Zak2014-02-17 10:55:56 +0100
committerKarel Zak2014-02-17 11:13:54 +0100
commitd6cecc3fbab62e5ccd850a41273b6ced24bb29d2 (patch)
treed17640838ae98386d6ccd16799d8f388858bbef3 /sys-utils/fallocate.1
parentfallocate: add --verbose, clean up usage() (diff)
downloadkernel-qcow2-util-linux-d6cecc3fbab62e5ccd850a41273b6ced24bb29d2.tar.gz
kernel-qcow2-util-linux-d6cecc3fbab62e5ccd850a41273b6ced24bb29d2.tar.xz
kernel-qcow2-util-linux-d6cecc3fbab62e5ccd850a41273b6ced24bb29d2.zip
fallocate: improve --dig-holes
* don't use --length to specify hole size, always use stat.st_blksize * use --offset and --length to specify offset within the file (like another fallocate operations) Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/fallocate.1')
-rw-r--r--sys-utils/fallocate.113
1 files changed, 6 insertions, 7 deletions
diff --git a/sys-utils/fallocate.1 b/sys-utils/fallocate.1
index 8f862ab61..ec84ce7c6 100644
--- a/sys-utils/fallocate.1
+++ b/sys-utils/fallocate.1
@@ -44,15 +44,14 @@ 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.
.IP "\fB\-d, \-\-dig-holes\fP"
-Detect and dig holes of, at least, \fIlength\fR size. If \fIlength\fR is not
-specified, it defaults to 32k. Makes the file sparse in-place, without using
-extra disk space. You can think of this as doing a "\fBcp --sparse\fP" and
-renaming the dest file as the original, without the need for extra disk space.
+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
+(usually 4096 bytes). Also, when using this option, \fI\-\-keep-size\fP is
+implied.
.PP
.IP
-Note that too small values for \fIlength\fR might be ignored. And too big values
-might use lot of RAM and not detect many holes. Also, when using this option,
-\fI\-\-keep-size\fP is implied.
+You can think of this as doing a "\fBcp --sparse\fP" and
+renaming the dest file as the original, without the need for extra disk space.
.IP "\fB\-o, \-\-offset\fP \fIoffset\fP
Specifies the beginning offset of the allocation, in bytes.
.IP "\fB\-l, \-\-length\fP \fIlength\fP