From f9b16db86859661ac809049fdf54f3fb36755f62 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 10 May 2016 23:23:14 -0400 Subject: [PATCH] More man page and usage message fixups Signed-off-by: Theodore Ts'o --- e2fsck/e2fsck.conf.5.in | 2 +- misc/filefrag.c | 2 +- misc/mke2fs.conf.5.in | 126 +++++++++++++++++++++--------------------------- 3 files changed, 57 insertions(+), 73 deletions(-) diff --git a/e2fsck/e2fsck.conf.5.in b/e2fsck/e2fsck.conf.5.in index ab83180..1f80a04 100644 --- a/e2fsck/e2fsck.conf.5.in +++ b/e2fsck/e2fsck.conf.5.in @@ -210,7 +210,7 @@ Use this percentage of memory to try to read in metadata blocks ahead of the main e2fsck thread. This should reduce run times, depending on the speed of the underlying storage and the amount of free memory. There is no default, but see -.B readahead_mem_pct +.B readahead_kb for more details. .TP .I readahead_kb diff --git a/misc/filefrag.c b/misc/filefrag.c index d89d3c9..1a18512 100644 --- a/misc/filefrag.c +++ b/misc/filefrag.c @@ -514,7 +514,7 @@ out_close: static void usage(const char *progname) { - fprintf(stderr, "Usage: %s [-b{blocksize}] [-BeklsvxX] file ...\n", + fprintf(stderr, "Usage: %s [-b{blocksize}] [-BeksvxX] file ...\n", progname); exit(1); } diff --git a/misc/mke2fs.conf.5.in b/misc/mke2fs.conf.5.in index ad6c11b..0830d2e 100644 --- a/misc/mke2fs.conf.5.in +++ b/misc/mke2fs.conf.5.in @@ -1,26 +1,26 @@ .\" -*- nroff -*- .\" Copyright 2006 by Theodore Ts'o. All Rights Reserved. .\" This file may be copied under the terms of the GNU Public License. -.\" +.\" .TH mke2fs.conf 5 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@" .SH NAME mke2fs.conf \- Configuration file for mke2fs .SH DESCRIPTION .I mke2fs.conf -is the configuration file for -.BR mke2fs (8). -It controls the default parameters used by +is the configuration file for +.BR mke2fs (8). +It controls the default parameters used by .BR mke2fs (8) when it is creating ext2, ext3, or ext4 filesystems. .PP The .I mke2fs.conf -file uses an INI-style format. Stanzas, or top-level sections, are -delimited by square braces: [ ]. Within each section, each line +file uses an INI-style format. Stanzas, or top-level sections, are +delimited by square braces: [ ]. Within each section, each line defines a relation, which assigns tags to values, or to a subsection, -which contains further relations or subsections. +which contains further relations or subsections. .\" Tags can be assigned multiple values -An example of the INI-style format used by this configuration file +An example of the INI-style format used by this configuration file follows below: .P [section1] @@ -49,14 +49,14 @@ follows below: .br } .P -Comments are delimited by a semicolon (';') or a hash ('#') character -at the beginning of the comment, and are terminated by the end of +Comments are delimited by a semicolon (';') or a hash ('#') character +at the beginning of the comment, and are terminated by the end of line character. .P Tags and values must be quoted using double quotes if they contain -spaces. Within a quoted string, the standard backslash interpretations -apply: "\en" (for the newline character), -"\et" (for the tab character), "\eb" (for the backspace character), +spaces. Within a quoted string, the standard backslash interpretations +apply: "\en" (for the newline character), +"\et" (for the tab character), "\eb" (for the backspace character), and "\e\e" (for the backslash character). .P Some relations expect a boolean value. The parser is quite liberal on @@ -64,7 +64,7 @@ recognizing ``yes'', '`y'', ``true'', ``t'', ``1'', ``on'', etc. as a boolean true value, and ``no'', ``n'', ``false'', ``nil'', ``0'', ``off'' as a boolean false value. .P -The following stanzas are used in the +The following stanzas are used in the .I mke2fs.conf file. They will be described in more detail in future sections of this document. @@ -79,14 +79,16 @@ used by In general, these defaults may be overridden by a definition in the .B fs_types stanza, or by an command-line option provided by the user. -.TP +.TP .I [fs_types] Contains relations which define defaults that should be used for specific -filesystem types. The filesystem type can be specified explicitly using -the -.B -T -option to -.BR mke2fs (8). +file system and usage types. The file system type and usage type can be +specified explicitly using +the +.BR \-t and \-T +options to +.BR mke2fs (8), +respectively. .SH THE [options] STANZA The following relations are defined in the .I [options] @@ -100,7 +102,7 @@ seconds, after asking the user for permission to proceed, even if the user has not answered the question. Defaults to 0, which means to wait until the user answers the question one way or another. .SH THE [defaults] STANZA -The following relations are defined in the +The following relations are defined in the .I [defaults] stanza. .TP @@ -110,21 +112,21 @@ newly created filesystems. It may be overridden by the .I base_features relation found in the filesystem or usage type subsection of the -.I [fs_types] +.I [fs_types] stanza. .TP .I default_features This relation specifies a set of features that should be added or removed to the features listed in the .I base_features -relation. It may be overridden by the filesystem-specific +relation. It may be overridden by the filesystem-specific .I default_features in the filesystem or usage type subsection of .IR [fs_types] , -and by the +and by the .B -O command-line option -to +to .BR mke2fs (8). .TP .I enable_periodic_fsck @@ -155,46 +157,13 @@ is not started using a program name of the form .BI mkfs. fs-type\fR. If both the user and the .B mke2fs.conf -file does not specify a default filesystem type, mke2fs will use a +file do not specify a default filesystem type, mke2fs will use a default filesystem type of .IR ext3 if a journal was requested via a command-line option, or .I ext2 if not. .TP -.I blocksize -This relation specifies the default blocksize if the user does not -specify a blocksize on the command line, and the filesystem-type -specific section of the configuration file does not specify a blocksize. -.TP -.I hash_alg -This relation specifies the default hash algorithm used for the -new filesystems with hashed b-tree directories. Valid algorithms -accepted are: -.IR legacy , -.IR half_md4 , -and -.IR tea . -.TP -.I inode_ratio -This relation specifies the default inode ratio if the user does not -specify one on the command line, and the filesystem-type -specific section of the configuration file does not specify a default -inode ratio. -.TP -.I inode_size -This relation specifies the default inode size if the user does not -specify one on the command line, and the filesystem-type -specific section of the configuration file does not specify a default -inode size. -.TP -.I reserved_ratio -This relation specifies the default percentage of filesystem blocks -reserved for the super-user, if the user does not -specify one on the command line, and the filesystem-type -specific section of the configuration file does not specify a default -reserved ratio. This value can be a floating point number. -.TP .I undo_dir This relation specifies the directory where the undo file should be stored. It can be overridden via the @@ -203,9 +172,22 @@ environment variable. If the directory location is set to the value .IR none , .B mke2fs will not create an undo file. +.PP +In addition, any tags that can be specified in a per-file system tags +subsection as defined below (e.g., +.IR blocksize , +.IR hash_alg , +.IR inode_ratio , +.IR inode_size , +.IR reserved_ratio , +etc.) can also be specified in the +.I defaults +stanza to specify the default value to be used if the user does not +specify one on the command line, and the filesystem-type +specific section of the configuration file does not specify a default value. .SH THE [fs_types] STANZA Each tag in the -.I [fs_types] +.I [fs_types] stanza names a filesystem type or usage type which can be specified via the .B \-t or @@ -292,7 +274,7 @@ will be used, so the filesystem will have an inode size of 128. .P The exception to this resolution is the .I features -tag, which is specifies a set of changes to the features used by the +tag, which specifies a set of changes to the features used by the filesystem, and which is cumulative. So in the above example, first the configuration relation defaults.base_features would enable an initial feature set with the sparse_super, filetype, resize_inode, and @@ -301,11 +283,13 @@ fs_types.ext4.features would enable the extents and flex_bg features, and finally the configuration relation fs_types.floppy.features would remove the resize_inode feature, resulting in a filesystem feature set -consisting of the sparse_super, filetype, resize_inode, dir_index, +consisting of the sparse_super, filetype, dir_index, extents_and flex_bg features. .P -For each filesystem type, the following tags may be used in that -fs_type's subsection: +For each filesystem type, the following tags may be used in that +fs_type's subsection. These tags may also be used in the +.I default +section: .TP .I base_features This relation specifies the features which are initially enabled for this @@ -350,7 +334,7 @@ relation specified in the fs_types list will be applied in the order found in the fs_types list. .TP .I default_features -This relation specifies set of features which should be enabled or +This relation specifies set of features which should be enabled or disabled after applying the features listed in the .I base_features and @@ -380,11 +364,11 @@ This relation specifies the default blocksize if the user does not specify a blocksize on the command line. .TP .I lazy_itable_init -This boolean relation specifies whether the inode table should +This boolean relation specifies whether the inode table should be lazily initialized. It only has meaning if the uninit_bg feature is enabled. If lazy_itable_init is true and the uninit_bg feature is enabled, the inode table will -not fully initialized by +not be fully initialized by .BR mke2fs (8). This speeds up filesystem initialization noticeably, but it requires the kernel to finish @@ -503,7 +487,7 @@ requirement will be imposed on the huge files. Thie relations specifies whether the alignment should be relative to the beginning of the hard drive (assuming that the starting offset of the partition is available to mke2fs). The default value is false, which -if will cause hugefile alignment to be relative to the beginning of the +will cause hugefile alignment to be relative to the beginning of the file system. .TP .I hugefiles_name @@ -520,7 +504,7 @@ written to the hugefiles while is creating them. By default, zero blocks will be written to the huge files to avoid stale data from being made available to potentially untrusted user programs, unless the device supports a discard/trim -operation which will take care of zeroing the device blocks. By +operation which will take care of zeroing the device blocks. By setting .I zero_hugefiles to false, this step will always be skipped, which can be useful if it is known that the disk has been previously erased, or if the user programs @@ -528,7 +512,7 @@ that will have access to the huge files are trusted to not reveal stale data. .SH THE [devices] STANZA Each tag in the -.I [devices] +.I [devices] stanza names device name so that per-device defaults can be specified. .TP .I fs_type @@ -543,7 +527,7 @@ option, if this option isn't specified on the command line. .SH FILES .TP .I /etc/mke2fs.conf -The configuration file for +The configuration file for .BR mke2fs (8). .SH SEE ALSO .BR mke2fs (8) -- 1.8.3.1