]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fallocate: Clarify that space can also be deallocated
authorRodrigo Campos <rodrigo@sdfg.com.ar>
Sat, 25 Jan 2014 19:17:26 +0000 (19:17 +0000)
committerKarel Zak <kzak@redhat.com>
Fri, 14 Feb 2014 10:00:38 +0000 (11:00 +0100)
The functionality is already there, with --punch-hole, but the text was for the
preallocation case only.

Signed-off-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
sys-utils/fallocate.1
sys-utils/fallocate.c

index d462cee9ce95bd749c9d8ada8bd13013b4ad356b..efa42c1d20dce864df7d6599d32395c0bc77af72 100644 (file)
@@ -1,7 +1,7 @@
 .\" -*- nroff -*-
 .TH FALLOCATE 1 "September 2011" "util-linux" "User Commands"
 .SH NAME
-fallocate \- preallocate space to a file
+fallocate \- preallocate or deallocate space to a file
 .SH SYNOPSIS
 .B fallocate
 .RB [ \-n ]
@@ -13,10 +13,11 @@ fallocate \- preallocate space to a file
 .I filename
 .SH DESCRIPTION
 .B fallocate
-is used to preallocate blocks to a file.  For filesystems which support the
-fallocate system call, this is done quickly by allocating blocks and marking
-them as uninitialized, requiring no IO to the data blocks.  This is much faster
-than creating a file by filling it with zeros.
+is used to manipulate the allocated disk space for a file, either to deallocate
+or preallocate it. For filesystems which support the fallocate system call,
+preallocation is done quickly by allocating blocks and marking them as
+uninitialized, requiring no IO to the data blocks. This is much faster than
+creating a file by filling it with zeros.
 .PP
 As of the Linux Kernel v2.6.31, the fallocate system call is supported by the
 btrfs, ext4, ocfs2, and xfs filesystems.
index cd35b2d30be3cc5984d550063ab53b745ba560b0..55e841115d2be7f7175481901c2c120bcf839f87 100644 (file)
@@ -62,8 +62,8 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
        fputs(USAGE_OPTIONS, out);
        fputs(_(" -n, --keep-size     don't modify the length of the file\n"
                " -p, --punch-hole    punch holes in the file\n"
-               " -o, --offset <num>  offset of the allocation, in bytes\n"
-               " -l, --length <num>  length of the allocation, in bytes\n"), out);
+               " -o, --offset <num>  offset of the (de)allocation, in bytes\n"
+               " -l, --length <num>  length of the (de)allocation, in bytes\n"), out);
        fputs(USAGE_SEPARATOR, out);
        fputs(USAGE_HELP, out);
        fputs(USAGE_VERSION, out);