Commit Graph

31 Commits

Author SHA1 Message Date
Karel Zak 562adaed91 fallocate: add man page note about --collapse-range granularity
Reported-by: Radka Skvarilova <rskvaril@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-07-03 13:51:51 +02:00
Bjarni Ingi Gislason 9c56988af6 sys-utils/fallocate.1: Some tidying of the manual
Test nr. 2:

Enable and fix warnings from 'test-groff'.

Input file is /tmp/fallocate.1

<fallocate.1>:10 (macro IR): only 1 argument, but more are expected
<fallocate.1>:24 (macro RB): only 1 argument, but more are expected
<fallocate.1>:25 (macro IR): only 1 argument, but more are expected

chk_manuals: Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z

  and

Test nr. 15:

Change the name of a macro for two fonts (e.g., BR and IR) to one letter,
if there is only one argument.
Add the second argument if needed.  It is sometimes part of the first one.

10:.IR length
24:.RB \-l
25:.IR length

#####

Test nr. 12:

Change -- in x--y to \(em (em-dash), or, if an
option, to \-\-

65:You can think of this option as doing a "\fBcp --sparse\fP" and then renaming

#####

Test nr. 20:

Use a macro to change to the italic font, instead of \fI [1], if
possible.
The macros have the italic corrections, but "\c" removes them.
[1] man-pages(7)

39:The \fIlength\fR and \fIoffset\fR
50:to be collapsed starts at \fIoffset\fP and continues
51:for \fIlength\fR bytes.  At the completion of the operation, the contents of
52:the file starting at the location \fIoffset\fR+\fIlength\fR will be appended at the
53:location \fIoffset\fR, and the file will be \fIlength\fR bytes smaller.  The option
71:Insert a hole of \fIlength\fR bytes from \fIoffset\fR, shifting existing data.
85:\fIoffset\fP and continuing for \fIlength\fR bytes.  Within the
103:Zeroes space in the byte range starting at \fIoffset\fP and
104:continuing for \fIlength\fR bytes.  Within the specified range, blocks are

#####

Test nr. 27:

Split lines longer than 80 characters into two or more lines.
Apropriate break points are the end of a sentence and a subordinate
clause.

fallocate.1: line 45	length 86
fallocate.1: line 52	length 83
fallocate.1: line 53	length 83
fallocate.1: line 100	length 95

#####

Test nr. 28:

Wrong distance between sentences or protect the indicator.

1) Separate the sentences and subordinate clauses; each begins on a new
line.  See man-pages(7) and "info groff".

Or

2) Adjust space between sentences (two spaces),

3) or protect the indicator by adding "\&" after it.

The "indicator" is an "end-of-sentence character" (.!?).

99:Enable POSIX operation mode. In that mode allocation operation always completes,

#####

Test nr. 37:

Have a space after a comma in an argument to an alternating fonts macro.
The space belongs to the comma, so ', '.

48:.BR \-c , " \-\-collapse\-range"
58:.BR \-d , " \-\-dig\-holes"
70:.BR \-i , " \-\-insert\-range"
73:.BR \-l , " \-\-length " \fIlength
76:.BR \-n , " \-\-keep\-size"
80:.BR \-o , " \-\-offset " \fIoffset
83:.BR \-p , " \-\-punch\-hole"
95:.BR \-v , " \-\-verbose"
98:.BR \-x , " \-\-posix"
102:.BR \-z , " \-\-zero\-range"
119:.BR \-V , " \-\-version"
122:.BR \-h , " \-\-help"

#####

Test nr. 38:

Email addresses use the macro ".MT" and end with ".ME".

125:.UR sandeen@redhat.com
129:.UR kzak@redhat.com

#####

Test nr. 40:

Add a comma before "and", "or", or "nor" if a series contains three or
more words

41:MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is
43:KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
45:The options \fB\-\-collapse\-range\fP, \fB\-\-dig\-holes\fP, \fB\-\-punch\-hole\fP and

#####

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2018-04-06 13:05:58 +02:00
Denis Chaplygin 833f9a7aae fallocate: Added posix_fallocate() support.
No all filesystems support Linux fallocate. The new option allow use
posix implementation if necessary.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-01-31 12:51:28 +01:00
Sébastien Helleu d673b74e9d docs: replace FTP by HTTPS in kernel.org URLs
The links to ftp://ftp.kernel.org/ are replaced by
https://www.kernel.org/.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-19 11:22:26 +01:00
Fabian Frederick b439065634 fallocate: add insert range support
Based on patch 83cc932d74
("fallocate: introduce an option -c to support COLLAPSE_RANGE")

This patch includes FALLOC_FL_INSERT_RANGE flag
added to Linux kernel v4.1

Thanks to Pádraig Brady for insert range definition

Signed-off-by: Fabian Frederick <fabf@skynet.be>
2016-12-02 13:56:32 +01:00
Michael Kerrisk (man-pages) f053ff1e3a Place SEE ALSO entries in order
This patch does only the following:

* Order SEE ALSO entries first by section name, then alphabetically
  within section
* Adds one or two missing commas in SEE ALSO lists
* Removes one or two periods that were (inconsistently) used
  at the end of SEE ALSO lists.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-29 10:44:19 +01:00
Benno Schulenberg 49b7f95e43 docs: miscellaneous tiny tweaks of man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:54 +01:00
Benno Schulenberg 47f9b35ef4 fallocate: improve synopsis and spelling in man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-14 16:11:04 +01:00
Benno Schulenberg 0167ca8215 fallocate: restore man-page content that was deleted in commit 5b033bfd
Reported-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-14 16:11:02 +01:00
Karel Zak 5b033bfd85 chrt: make man page more structured
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-20 14:30:52 +01:00
J William Piggott b06c1ca6f8 docs: restore minus symbols in long opts
Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-01-20 18:15:30 -05:00
Benno Schulenberg 3a60b1c26b docs: remove obsolete and unneeded comments from man-page files
Transform some of them into copyright lines.
Also fix three header lines and snip some trailing whitespace.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-01-12 11:03:26 +01:00
Benno Schulenberg 5e43af7e34 docs: fix some things that were overlooked during the first pass
Mainly more option sorting, some formatting adjustments, and the adding
of a missing --version here and there.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-28 11:16:53 +02:00
Karel Zak b7f3f147f2 fallocate: use err_exclusive_options(), cleanup getopt_long() stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-26 12:38:04 +02:00
Karel Zak 634a4cf1b2 fallocate: make man page readable for humans
Well, let's copy & past from fallocate(2) syscall man page rather than
try to be creative with another description for the flags.

Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-26 12:04:12 +02:00
Lukas Czerner 1fd4f609ee 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>
2014-04-18 12:49:42 +02:00
Dongsu Park 83cc932d74 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>
2014-04-18 12:49:39 +02:00
Karel Zak 9b1b6ed187 fallocate: fix man page synopsis
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-02-17 15:34:08 +01:00
Karel Zak d6cecc3fba 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>
2014-02-17 11:13:54 +01:00
Karel Zak 782c290c5c fallocate: add --verbose, clean up usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-02-14 14:37:51 +01:00
Rodrigo Campos 24b2a479fd fallocate: Add "--dig-holes" option
This option tries to detect chunk of '\0's and punch a hole, making the file
sparse in-place.

[kzak@redhat.com: - fix coding style, use xalloc.h and err.h]

Signed-off-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-02-14 11:31:12 +01:00
Rodrigo Campos a8d10d1c9d fallocate: Clarify that space can also be deallocated
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>
2014-02-14 11:00:38 +01:00
Benno Schulenberg b4362b6f84 docs: standardize the phrases for --help and --version in all man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-15 10:28:30 +02:00
Karel Zak 16ef36f783 docs: add TB to list of supported suffixes
Reported-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-18 18:31:07 +01:00
Bernhard Voelker d636d6d82a docs: clarify KiB vs. KB in man pages
Update the man pages of blkid, wipefs, fallocate, fstrim, losetup
and hexdump to clarify the suffixes for the numerical values of the
offset and size/length arguments regarding KiB=1024 vs KB=1000.
Also mention the ZiB/YiB and ZB/YB suffixes supported by strtosize().

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-03-30 15:23:32 +02:00
Cong Wang 411fd3c27a fallocate: add FALLOC_FL_PUNCH_HOLE support
Recent Linux kernel supports FALLOC_FL_PUNCH_HOLE in fallocate(2).
This patch adds FALLOC_FL_PUNCH_HOLE support to fallocate utility,
by introducing a new option -p|--punch-hole.

[kzak@redhat.com: - fix merge conflict in fallocate.1]

Cc: Karel Zak <kzak@redhat.com>
Cc: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-23 13:12:48 +01:00
Sami Kerola 1d803460f7 docs: align fallocate.1 with howto-man-page.txt
Add also earlierly missing --version to the manual.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 22:06:12 +02:00
Benno Schulenberg 232dc924c4 docs: uniformize the header and footer lines in man pages
Use dates without the day, use the full month name, put "util-linux" in
the lower left corner, and "User Commands" or "System Administration"
at the top center.

Also improve here and there the one-line program description.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-22 10:39:21 +02:00
Karel Zak 601d12fb10 rename util-linux-ng back to util-linux
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:41:59 +01:00
Karel Zak 3b6b039ae8 fallocate: support suffixes for --offset and --lenght
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-30 14:45:37 +02:00
Karel Zak d46a54994e fallocate: new command
The fallocate(1) utility is used to preallocate blocks to a file.

This can be useful for virtual images, database files, testing, etc.
Normally we'd hope that various tools will start using preallocation
internally, but until then such a utility may be useful, and could be
scripted as well.

The original Eric's version is available at:
http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/2490

This version:
 - checks for fallocate glibc function and kernel syscall
 - does not provide a fallback and does not call posix_fallocate()
 - adds long options
 - uses err.h for errro messages
 - adds NLS support
 - cleanups man page

Co-Author: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-22 15:26:18 +02:00