summaryrefslogtreecommitdiffstats
path: root/sys-utils/fallocate.1
diff options
context:
space:
mode:
authorDongsu Park2014-02-27 11:35:07 +0100
committerKarel Zak2014-04-18 12:49:39 +0200
commit83cc932d7412cb9d23bf9f06a9a54c8566e1a788 (patch)
tree45d2fbf9b7ac14d08d0f5bd66e44ddf2c8e1eda0 /sys-utils/fallocate.1
parentlibsmartcols: fix buffer usage (diff)
downloadkernel-qcow2-util-linux-83cc932d7412cb9d23bf9f06a9a54c8566e1a788.tar.gz
kernel-qcow2-util-linux-83cc932d7412cb9d23bf9f06a9a54c8566e1a788.tar.xz
kernel-qcow2-util-linux-83cc932d7412cb9d23bf9f06a9a54c8566e1a788.zip
fallocate: introduce an option -c to support COLLAPSE_RANGE
Introduce a new option -c (or --collapse-range) to support a new flag FALLOC_FL_COLLAPSE_RANGE for fallocate(2). It will nullify a particular range [offset, offset+len] by shifting extents beyond the range to the beginning of the hole. Cc: Lukas Czerner <lczerner@redhat.com> Cc: Namjae Jeon <namjae.jeon@samsung.com> Cc: Ashish Sangwan <a.sangwan@samsung.com> Signed-off-by: Dongsu Park <dongsu.park@profitbricks.com>
Diffstat (limited to 'sys-utils/fallocate.1')
-rw-r--r--sys-utils/fallocate.17
1 files changed, 7 insertions, 0 deletions
diff --git a/sys-utils/fallocate.1 b/sys-utils/fallocate.1
index 8a3aa4fbe..634c595b4 100644
--- a/sys-utils/fallocate.1
+++ b/sys-utils/fallocate.1
@@ -6,6 +6,7 @@ fallocate \- preallocate or deallocate space to a file
.B fallocate
.RB [ \-n ]
.RB [ \-p ]
+.RB [ \-c ]
.RB [ \-o
.IR offset ]
.B \-l
@@ -54,6 +55,12 @@ implied.
.IP
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\-c, \-\-collapse-range\fP"
+Collapse a particular file range to nullify the hole. Extents beyond the range
+[offset, offset+length] will be shifted to the beginning of hole. Hence this
+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\-o, \-\-offset\fP \fIoffset\fP
Specifies the beginning offset of the allocation, in bytes.
.IP "\fB\-l, \-\-length\fP \fIlength\fP