2017-12-14 07:14:33

by Tyson Nottingham

[permalink] [raw]
Subject: [PATCH 0/5] e2fsprogs: Update man pages, usage texts, and docs.

These patches add missing feature descriptions and command arguments to
man pages and usage texts. They also fix some minor typos.

I'm just getting familiar with ext4, and this is the first patch series
I've sent to a mailing list, so I expect there to be issues. Please let
me know of any.

The patches are based off of the master branch of e2fsprogs. Should I be
working from a different branch? Also, I did not update any of the
localization files. Do I need to worry about handling that?

Thanks,
Tyson

Tyson Nottingham (5):
Add missing features and mount options to ext4 man page.
Add missing information to e2fsck man pages and usage text.
Add missing information to debugfs man pages and usage texts.
Add missing information to various man pages and usage texts.
Fix minor typos in libext2fs documentation.

debugfs/debugfs.8.in | 49 +++++++++++++---
debugfs/debugfs.c | 10 ++--
debugfs/do_journal.c | 2 +-
debugfs/logdump.c | 2 +-
debugfs/ls.c | 2 +-
debugfs/set_fields.c | 4 +-
debugfs/xattrs.c | 2 +-
doc/libext2fs.texinfo | 16 +++---
e2fsck/e2fsck.8.in | 25 +++++----
e2fsck/e2fsck.conf.5.in | 21 ++++++-
e2fsck/unix.c | 1 +
misc/badblocks.c | 2 +-
misc/chattr.1.in | 2 +-
misc/e2image.8.in | 2 +-
misc/e2image.c | 2 +-
misc/e2undo.8.in | 18 ++++++
misc/e2undo.c | 2 +-
misc/e4crypt.8.in | 8 +--
misc/e4crypt.c | 4 +-
misc/ext4.5.in | 146 +++++++++++++++++++++++++++++++++---------------
misc/lsattr.1.in | 4 +-
misc/mke2fs.8.in | 9 +++
misc/mke2fs.conf.5.in | 78 ++++++++++++--------------
misc/tune2fs.8.in | 33 +++++++----
misc/tune2fs.c | 6 +-
resize/main.c | 3 +-
26 files changed, 300 insertions(+), 153 deletions(-)

--
2.7.4


2017-12-14 07:14:35

by Tyson Nottingham

[permalink] [raw]
Subject: [PATCH 1/5] Add missing features and mount options to ext4 man page.

Add descriptions for ea_inode, large_dir, metadata_csum, and
metadata_csum_seed features, as well as nombcache and prjquota
mount options. Also, update a couple of descriptions.

Signed-off-by: Tyson Nottingham <[email protected]>
---
misc/ext4.5.in | 146 ++++++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 102 insertions(+), 44 deletions(-)

diff --git a/misc/ext4.5.in b/misc/ext4.5.in
index 45aceb2..8f4c4f5 100644
--- a/misc/ext4.5.in
+++ b/misc/ext4.5.in
@@ -78,6 +78,14 @@ lifts this limit by causing ext4 to use a link count of 1 to indicate
that the number of hard links to a directory is not known when the link
count might exceed the maximum count limit.
.TP
+.B ea_inode
+.br
+Normally, a file's extended attributes and associated metadata must fit within
+the inode or the inode's associated extended attribute block. This feature
+allows the value of each extended attribute to be placed in the data blocks of a
+separate inode if necessary, increasing the limit on the size and number of
+extended attributes per file.
+.TP
.B encrypt
.br
This ext4 feature provides file-system level encryption of data blocks
@@ -175,27 +183,40 @@ option to
or
.BR tune2fs(8).
.TP
+.B large_dir
+.br
+This feature increases the limit on the number of files per directory by
+raising the maximum size of directories and, for hashed b-tree directories (see
+.BR dir_index ),
+the maximum height of the hashed b-tree used to store the directory entries.
+.TP
.B large_file
.br
This feature flag is set automatically by modern kernels when a file
larger than 2 gigabytes is created. Very old kernels could not
handle large files, so this feature flag was used to prohibit those
kernels from mounting file systems that they could not understand.
-.\" .TP
-.\" .B metadata_csum
-.\" .br
-.\" This ext4 feature enables metadata checksumming. This feature stores
-.\" checksums for all of the filesystem metadata (superblock, group
-.\" descriptor blocks, inode and block bitmaps, directories, and
-.\" extent tree blocks). The checksum algorithm used for the metadata
-.\" blocks is different than the one used for group descriptors with the
-.\" .B uninit_bg
-.\" feature, these two features are incompatible and
-.\" .B metadata_csum
-.\" will be used preferentially instead of
-.\" .BR uninit_bg .
-.\" .br
-.\" .B Future feature, available in e2fsprogs 1.43-WIP
+.TP
+.B metadata_csum
+.br
+This ext4 feature enables metadata checksumming. This feature stores
+checksums for all of the filesystem metadata (superblock, group
+descriptor blocks, inode and block bitmaps, directories, and
+extent tree blocks). The checksum algorithm used for the metadata
+blocks is different than the one used for group descriptors with the
+.B uninit_bg
+feature. These two features are incompatible and
+.B metadata_csum
+will be used preferentially instead of
+.BR uninit_bg .
+.TP
+.B metadata_csum_seed
+.br
+This feature allows the filesystem to store the metadata checksum seed in the
+superblock, which allows the administrator to change the UUID of a filesystem
+using the
+.B metadata_csum
+feature while it is mounted.
.TP
.B meta_bg
.br
@@ -214,10 +235,6 @@ available in the resize inode.
This ext4 feature provides multiple mount protection (MMP). MMP helps to
protect the filesystem from being multiply mounted and is useful in
shared storage environments.
-.IP
-Causes the quota files (i.e., user.quota and
-group.quota which existed
-in the older quota design) to be hidden inodes.
.TP
.B project
.br
@@ -230,6 +247,10 @@ Create quota inodes (inode #3 for userquota and inode
#4 for group quota) and set them in the superblock.
With this feature, the quotas will be enabled
automatically when the filesystem is mounted.
+.IP
+Causes the quota files (i.e., user.quota and
+group.quota which existed
+in the older quota design) to be hidden inodes.
.TP
.B resize_inode
.br
@@ -248,6 +269,8 @@ extended option.
.IP
This feature requires that the
.B sparse_super
+or
+.B sparse_super2
feature be enabled.
.TP
.B sparse_super
@@ -382,18 +405,26 @@ These options determine who can use the reserved blocks.
(Roughly: whoever has the specified uid, or belongs to the specified group.)
.TP
.BI sb= n
-Instead of block 1, use block
-.I n
-as superblock. This could be useful when the filesystem has been damaged.
-(Earlier, copies of the superblock would be made every 8192 blocks: in
-block 1, 8193, 16385, \&...\& (and one got thousands of copies on
-a big filesystem). Since version 1.08,
+Instead of using the normal superblock, use an alternative superblock
+specified by
+.IR n .
+This option is normally used when the primary superblock has been
+corrupted. The location of backup superblocks is dependent on the
+filesystem's blocksize, the number of blocks per group, and features
+such as
+.BR sparse_super .
+.IP
+Additional backup superblocks can be determined by using the
.B mke2fs
-has a \-s (sparse superblock) option to reduce the number of backup
-superblocks, and since version 1.15 this is the default. Note
-that this may mean that ext2 filesystems created by a recent
+program using the
+.B \-n
+option to print out where the superblocks exist, supposing
.B mke2fs
-cannot be mounted r/w under Linux 2.0.*.)
+is supplied with arguments that are consistent with the filesystem's layout
+(e.g. blocksize, blocks per group,
+.BR sparse_super ,
+etc.).
+.IP
The block number here uses 1\ k units. Thus, if you want to use logical
block 32768 on a filesystem with 4\ k blocks, use "sb=131072".
.TP
@@ -470,13 +501,22 @@ Enable Extended User Attributes. See the
.BR attr (5)
manual page.
.TP
-.BR usrjquota=aquota.user | grpjquota=aquota.group | jqfmt=vfsv0
+.BR jqfmt= { vfsold | vfsv0 | vfsv1 }
Apart from the old quota system (as in ext2, jqfmt=vfsold aka version 1 quota)
-ext3 also supports journaled quotas (version 2 quota). jqfmt=vfsv0
-enables journaled quotas. For journaled quotas the mount options
+ext3 also supports journaled quotas (version 2 quota). jqfmt=vfsv0 or
+jqfmt=vfsv1 enables journaled quotas. Journaled quotas have the advantage that
+even after a crash no quota check is required. When the
+.B quota
+filesystem feature is enabled, journaled quotas are used automatically, and
+this mount option is ignored.
+.TP
+.BR usrjquota=aquota.user | grpjquota=aquota.group
+For journaled quotas (jqfmt=vfsv0 or jqfmt=vfsv1), the mount options
usrjquota=aquota.user and grpjquota=aquota.group are required to tell the
-quota system which quota database files to use. Journaled quotas have the
-advantage that even after a crash no quota check is required.
+quota system which quota database files to use. When the
+.B quota
+filesystem feature is enabled, journaled quotas are used automatically, and
+this mount option is ignored.

.SH "Mount options for ext4"
The ext4 filesystem is an advanced level of the ext3 filesystem which
@@ -484,16 +524,16 @@ incorporates scalability and reliability enhancements for supporting large
filesystem.

The options
-.B journal_dev, norecovery, noload, data, commit, orlov, oldalloc, [no]user_xattr
-.B [no]acl, bsddf, minixdf, debug, errors, data_err, grpid, bsdgroups, nogrpid
-.B sysvgroups, resgid, resuid, sb, quota, noquota, nouid32, grpquota, usrquota
-.B usrjquota, grpjquota and jqfmt
-are backwardly compatible with ext3 or ext2.
+.B journal_dev, journal_path, norecovery, noload, data, commit, orlov,
+.B oldalloc, [no]user_xattr, [no]acl, bsddf, minixdf, debug, errors,
+.B data_err, grpid, bsdgroups, nogrpid, sysvgroups, resgid, resuid, sb,
+.B quota, noquota, nouid32, grpquota, usrquota, usrjquota, grpjquota,
+.B and jqfmt are backwardly compatible with ext3 or ext2.
.TP
-.B journal_checksum
-Enable checksumming of the journal transactions. This will allow the recovery
-code in e2fsck and the kernel to detect corruption in the kernel. It is a
-compatible change and will be ignored by older kernels.
+.B journal_checksum | nojournal_checksum
+The journal_checksum option enables checksumming of the journal transactions.
+This will allow the recovery code in e2fsck and the kernel to detect corruption
+in the kernel. It is a compatible change and will be ignored by older kernels.
.TP
.B journal_async_commit
Commit block can be written to disk without waiting for descriptor blocks. If
@@ -592,7 +632,7 @@ sparse/thinly-provisioned LUNs, but it is off by default until sufficient
testing has been done.
.TP
.BR block_validity / noblock_validity
-This options enables/disables the in-kernel facility for tracking
+This option enables/disables the in-kernel facility for tracking
filesystem metadata blocks within internal data structures. This allows multi-\c
block allocator and other routines to quickly locate extents which might
overlap with filesystem metadata blocks. This option is intended for debugging
@@ -619,6 +659,18 @@ seriously cramp the system's style.)
.TP
.B i_version
Enable 64-bit inode version support. This option is off by default.
+.TP
+.B nombcache
+This option disables use of mbcache for extended attribute deduplication. On
+systems where extended attributes are rarely or never shared between files,
+use of mbcache for deduplication adds unnecessary computational overhead.
+.TP
+.B prjquota
+The prjquota mount option enables project quota support on the filesystem.
+You need the quota utilities to actually enable and manage the quota system.
+This mount option requires the
+.B project
+filesystem feature.

.SH FILE ATTRIBUTES
The ext2, ext3, and ext4 filesystems support setting the following file
@@ -704,8 +756,14 @@ ext4, 3.16
ext4, 3.18
.IP "\fBencrypt\fR" 2in
ext4, 4.1
+.IP "\fBmetadata_csum_seed\fR" 2in
+ext4, 4.4
.IP "\fBproject\fR" 2in
ext4, 4.5
+.IP "\fBea_inode\fR" 2in
+ext4, 4.13
+.IP "\fBlarge_dir\fR" 2in
+ext4, 4.13
.SH SEE ALSO
.BR mke2fs (8),
.BR mke2fs.conf (5),
--
2.7.4

2017-12-14 07:14:36

by Tyson Nottingham

[permalink] [raw]
Subject: [PATCH 2/5] Add missing information to e2fsck man pages and usage text.

Add environment variable and defaults stanza information.
Also, update a couple of descriptions.

Signed-off-by: Tyson Nottingham <[email protected]>
---
e2fsck/e2fsck.8.in | 25 +++++++++++++++----------
e2fsck/e2fsck.conf.5.in | 21 ++++++++++++++++++++-
e2fsck/unix.c | 1 +
3 files changed, 36 insertions(+), 11 deletions(-)

diff --git a/e2fsck/e2fsck.8.in b/e2fsck/e2fsck.8.in
index 4c29943..1a3bd46 100644
--- a/e2fsck/e2fsck.8.in
+++ b/e2fsck/e2fsck.8.in
@@ -101,21 +101,21 @@ Instead of using the normal superblock, use an alternative superblock
specified by
.IR superblock .
This option is normally used when the primary superblock has been
-corrupted. The location of the backup superblock is dependent on the
-filesystem's blocksize. For filesystems with 1k blocksizes, a backup
-superblock can be found at block 8193; for filesystems with 2k
-blocksizes, at block 16384; and for 4k blocksizes, at block 32768.
+corrupted. The location of backup superblocks is dependent on the
+filesystem's blocksize, the number of blocks per group, and features
+such as
+.BR sparse_super .
.IP
Additional backup superblocks can be determined by using the
.B mke2fs
program using the
.B \-n
-option to print out where the superblocks were created. The
-.B \-b
-option to
-.BR mke2fs ,
-which specifies blocksize of the filesystem must be specified in order
-for the superblock locations that are printed out to be accurate.
+option to print out where the superblocks exist, supposing
+.B mke2fs
+is supplied with arguments that are consistent with the filesystem's layout
+(e.g. blocksize, blocks per group,
+.BR sparse_super ,
+etc.).
.IP
If an alternative superblock is specified and
the filesystem is not opened read-only, e2fsck will make sure that the
@@ -472,6 +472,11 @@ man page for more details.
Always include the full version string which
.B e2fsck
displays when it is run, so I know which version you are running.
+.SH ENVIRONMENT
+.TP
+.BI E2FSCK_CONFIG
+Determines the location of the configuration file (see
+.BR e2fsck.conf (5)).
.SH AUTHOR
This version of
.B e2fsck
diff --git a/e2fsck/e2fsck.conf.5.in b/e2fsck/e2fsck.conf.5.in
index a727932..708e213 100644
--- a/e2fsck/e2fsck.conf.5.in
+++ b/e2fsck/e2fsck.conf.5.in
@@ -69,6 +69,12 @@ This stanza contains general configuration parameters for
.BR e2fsck 's
behavior.
.TP
+.I [defaults]
+Contains relations which define the default parameters used by
+.BR e2fsck (8).
+In general, these defaults may be overridden by command-line options
+provided by the user.
+.TP
.I [problems]
This stanza allows the administrator to reconfigure how e2fsck handles
various filesystem inconsistencies.
@@ -250,6 +256,19 @@ If this boolean relation is true, e2fsck will run as if the option
.B -v
is always specified. This will cause e2fsck to print some additional
information at the end of each full file system check.
+.SH THE [defaults] STANZA
+The following relations are defined in the
+.I [defaults]
+stanza.
+.TP
+.I undo_dir
+This relation specifies the directory where the undo file should be
+stored. It can be overridden via the
+.B E2FSPROGS_UNDO_DIR
+environment variable. If the directory location is set to the value
+.IR none ,
+.B e2fsck
+will not create an undo file.
.SH THE [problems] STANZA
Each tag in the
.I [problems]
@@ -336,7 +355,7 @@ data structure, such as pruning an extent tree.
@[email protected]
@[email protected] numdirs_threshold
@TDB_MAN_COMMENT@If this relation is set, then in-memory data structures
-@TDB_MAN_COMMENT@be used if the number of directories in the filesystem
+@TDB_MAN_COMMENT@will be used if the number of directories in the filesystem
@TDB_MAN_COMMENT@are fewer than amount specified.
@[email protected]
@[email protected] dirinfo
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 2e9be8b..faf5af9 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -759,6 +759,7 @@ static void parse_extended_opts(e2fsck_t ctx, const char *opts)
fputs("\tno_inode_count_fullmap\n", stderr);
fputs(_("\treadahead_kb=<buffer size>\n"), stderr);
fputs("\tbmap2extent\n", stderr);
+ fputs("\tfixes_only\n", stderr);
fputc('\n', stderr);
exit(1);
}
--
2.7.4

2017-12-14 07:14:38

by Tyson Nottingham

[permalink] [raw]
Subject: [PATCH 3/5] Add missing information to debugfs man pages and usage texts.

Add descriptions for dump_unused, get_quota, list_quota,
set_current_time, show_debugfs_params, and supported_features
commands to debugfs man page. Add various missing command
arguments and correct a few typos in man page and usage texts.

Signed-off-by: Tyson Nottingham <[email protected]>
---
debugfs/debugfs.8.in | 49 ++++++++++++++++++++++++++++++++++++++++---------
debugfs/debugfs.c | 10 +++++-----
debugfs/do_journal.c | 2 +-
debugfs/logdump.c | 2 +-
debugfs/ls.c | 2 +-
debugfs/set_fields.c | 4 ++--
debugfs/xattrs.c | 2 +-
7 files changed, 51 insertions(+), 20 deletions(-)

diff --git a/debugfs/debugfs.8.in b/debugfs/debugfs.8.in
index 55abd71..4b5f472 100644
--- a/debugfs/debugfs.8.in
+++ b/debugfs/debugfs.8.in
@@ -143,7 +143,7 @@ Before overwriting a file system block, write the old contents of the block to
an undo file. This undo file can be used with e2undo(8) to restore the old
contents of the file system should something go wrong. If the empty string is
passed as the undo_file argument, the undo file will be written to a file named
-resize2fs-\fIdevice\fR.e2undo in the directory specified via the
+debugfs-\fIdevice\fR.e2undo in the directory specified via the
\fIE2FSPROGS_UNDO_DIR\fR environment variable.

WARNING: The undo file cannot be used to recover from a power or system crash.
@@ -237,8 +237,11 @@ Search the directory
for
.IR filename .
.TP
-.B dirty
+.BI dirty " [-clean]"
Mark the filesystem as dirty, so that the superblocks will be written on exit.
+Additionally, clear the superblock's valid flag, or set it if
+.I -clean
+is specified.
.TP
.BI dump " [-p] filespec out_file"
Dump the contents of the inode
@@ -290,7 +293,10 @@ not stored in filesystem data structures. Hence, the values displayed
may not necessarily by accurate and does not indicate a problem or
corruption in the file system.)
.TP
-.BI ea_get " [-f outfile] filespec attr_name"
+.B dump_unused
+Dump unused blocks which contain non-null bytes.
+.TP
+.BI ea_get " [-f outfile]|[-xVC] [-r] filespec attr_name"
Retrieve the value of the extended attribute
.I attr_name
in the file
@@ -302,7 +308,7 @@ List the extended attributes associated with the file
.I filespec
to standard output.
.TP
-.BI ea_set " [-f infile] filespec attr_name attr_value
+.BI ea_set " [-f infile] [-r] filespec attr_name attr_value
Set the value of the extended attribute
.I attr_name
in the file
@@ -402,6 +408,9 @@ If
.I num
is specified, also clear num-1 inodes after the specified inode.
.TP
+.BI get_quota " quota_type id"
+Display quota information for given quota type (user, group, or project) and ID.
+.TP
.B help
Print a list of commands understood by
.BR debugfs .
@@ -437,7 +446,7 @@ the superblock and block descriptors.
.BI journal_close
Close the open journal.
.TP
-.BI journal_open " [-c] [-v ver] [-j ext_jnl]
+.BI journal_open " [-c] [-v ver] [-f ext_jnl]
Opens the journal for reading and writing. Journal checksumming can
be enabled by supplying \fI-c\fR; checksum formats 2 and 3 can be
selected with the \fI-v\fR option. An external journal can be loaded
@@ -469,6 +478,9 @@ process to
.I directory
on the native filesystem.
.TP
+.BI list_quota " quota_type"
+Display quota information for given quota type (user, group, or project).
+.TP
.BI ln " filespec dest_file"
Create a link named
.I dest_file
@@ -476,7 +488,7 @@ which is a hard link to
.IR filespec .
Note this does not adjust the inode reference counts.
.TP
-.BI logdump " [-acsO] [-b block] [-i filespec] [-f journal_file] [output_file]"
+.BI logdump " [-acsOS] [-b block] [-i filespec] [-f journal_file] [output_file]"
Dump the contents of the ext3 journal. By default, dump the journal inode as
specified in the superblock. However, this can be overridden with the
.I \-i
@@ -490,6 +502,12 @@ option utilizes the backup information in the superblock to locate the
journal.
.IP
The
+.I \-S
+option causes
+.B logdump
+to print the contents of the journal superblock.
+.IP
+The
.I \-a
option causes the
.B logdump
@@ -498,7 +516,7 @@ The
.I \-b
option causes
.B logdump
-to print all journal records that are refer to the specified block.
+to print all journal records that refer to the specified block.
The
.I \-c
option will print out the contents of all of the data blocks selected by
@@ -570,7 +588,7 @@ to those inodes. The
flag will enable checking the file type information in the directory
entry to make sure it matches the inode's type.
.TP
-.BI open " [-weficD] [-b blocksize] [-s superblock] [-z undo_file] device"
+.BI open " [-weficD] [-b blocksize] [-d image_filename] [-s superblock] [-z undo_file] device"
Open a filesystem for editing. The
.I -f
flag forces the filesystem to be opened even if there are some unknown
@@ -578,7 +596,7 @@ or incompatible filesystem features which would normally
prevent the filesystem from being opened. The
.I -e
flag causes the filesystem to be opened in exclusive mode. The
-.IR -b ", " -c ", " -i ", " -s ", " -w ", and " -D
+.IR -b ", " -c ", " -d ", " -i ", " -s ", " -w ", and " -D
options behave the same as the command-line options to
.BR debugfs .
.TP
@@ -649,6 +667,10 @@ has value
Also available as
.BR set_bg .
.TP
+.BI set_current_time " time"
+Set current time in seconds since Unix epoch to use when setting filesystem
+fields.
+.TP
.BI seti " filespec [num]"
Mark inode
.I filespec
@@ -691,6 +713,11 @@ can be displayed by using the command:
Also available as
.BR ssv .
.TP
+.B show_debugfs_params
+Display
+.B debugfs
+parameters such as information about currently opened filesystem.
+.TP
.BI show_super_stats " [-h]"
List the contents of the super block and the block group descriptors. If the
.I -h
@@ -701,6 +728,10 @@ flag is given, only print out the superblock contents. Also available as
Display the contents of the inode structure of the inode
.IR filespec .
.TP
+.B supported_features
+Display filesystem features supported by this version of
+.BR debugfs .
+.TP
.BI testb " block [count]"
Test if the block number
.I block
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 4a533b5..341e742 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -292,7 +292,7 @@ void do_open_filesys(int argc, char **argv)

print_usage:
fprintf(stderr, "%s: Usage: open [-s superblock] [-b blocksize] "
- "[-d image_filename] [-c] [-i] [-f] [-e] [-D] "
+ "[-d image_filename] [-z undo_file] [-c] [-i] [-f] [-e] [-D] "
#ifndef READ_ONLY
"[-w] "
#endif
@@ -514,7 +514,7 @@ void do_show_super_stats(int argc, char *argv[])
close_pager(out);
return;
print_usage:
- fprintf(stderr, "%s: Usage: show_super [-h]\n", argv[0]);
+ fprintf(stderr, "%s: Usage: show_super_stats [-h]\n", argv[0]);
}

#ifndef READ_ONLY
@@ -1684,7 +1684,7 @@ void do_find_free_inode(int argc, char *argv[])
char *tmp;

if (argc > 3 || (argc>1 && *argv[1] == '?')) {
- com_err(argv[0], 0, "Usage: find_free_inode [dir] [mode]");
+ com_err(argv[0], 0, "Usage: find_free_inode [dir [mode]]");
return;
}
if (check_fs_open(argv[0]))
@@ -2416,11 +2416,11 @@ int main(int argc, char **argv)
int retval;
const char *usage =
"Usage: %s [-b blocksize] [-s superblock] [-f cmd_file] "
- "[-R request] [-V] ["
+ "[-R request] [-d data_source_device] [-i] [-n] [-D] [-V] ["
#ifndef READ_ONLY
"[-w] [-z undo_file] "
#endif
- "[-c] device]";
+ "[-c]] [device]";
int c;
int open_flags = EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_64BITS;
char *request = 0;
diff --git a/debugfs/do_journal.c b/debugfs/do_journal.c
index 40c473c..d7ab916 100644
--- a/debugfs/do_journal.c
+++ b/debugfs/do_journal.c
@@ -899,7 +899,7 @@ void do_journal_open(int argc, char *argv[])
printf("%s: [-c] [-v ver] [-f ext_jnl]\n", argv[0]);
printf("-c: Enable journal checksumming.\n");
printf("-v: Use this version checksum format.\n");
- printf("-j: Load this external journal.\n");
+ printf("-f: Load this external journal.\n");
}
}

diff --git a/debugfs/logdump.c b/debugfs/logdump.c
index 864f234..03edb44 100644
--- a/debugfs/logdump.c
+++ b/debugfs/logdump.c
@@ -275,7 +275,7 @@ errout:
return;

print_usage:
- fprintf(stderr, "%s: Usage: logdump [-acsO] [-b<block>] [-i<filespec>]\n\t"
+ fprintf(stderr, "%s: Usage: logdump [-acsOS] [-b<block>] [-i<filespec>]\n\t"
"[-f<journal_file>] [output_file]\n", argv[0]);
}

diff --git a/debugfs/ls.c b/debugfs/ls.c
index 61b6319..bfc28cb 100644
--- a/debugfs/ls.c
+++ b/debugfs/ls.c
@@ -228,7 +228,7 @@ void do_list_dir(int argc, char *argv[])

if (argc > optind+1) {
print_usage:
- com_err(0, 0, "Usage: ls [-l] [-d] [-p] file");
+ com_err(0, 0, "Usage: ls [-c] [-d] [-l] [-p] [-r] file");
return;
}

diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c
index 8dfbba9..117cfb8 100644
--- a/debugfs/set_fields.c
+++ b/debugfs/set_fields.c
@@ -787,7 +787,7 @@ void do_set_inode(int argc, char *argv[])
void do_set_block_group_descriptor(int argc, char *argv[])
{
const char *usage = "<bg number> <field> <value>\n"
- "\t\"set_block_group_descriptor -l\" will list the names of "
+ "\t\"set_block_group -l\" will list the names of "
"the fields in a block group descriptor\n\twhich can be set.";
struct field_set_info *table;
struct field_set_info *ss;
@@ -818,7 +818,7 @@ void do_set_block_group_descriptor(int argc, char *argv[])
return;
}

- if (common_args_process(argc, argv, 4, 4, "set_block_group_descriptor",
+ if (common_args_process(argc, argv, 4, 4, "set_block_group",
usage, CHECK_FS_RW))
return;

diff --git a/debugfs/xattrs.c b/debugfs/xattrs.c
index fdb76e4..390165c 100644
--- a/debugfs/xattrs.c
+++ b/debugfs/xattrs.c
@@ -267,7 +267,7 @@ void do_set_xattr(int argc, char **argv)

if (!(fp && optind == argc - 2) && !(!fp && optind == argc - 3)) {
print_usage:
- printf("Usage:\t%s <file> <attr> <value>\n", argv[0]);
+ printf("Usage:\t%s [-r] <file> <attr> <value>\n", argv[0]);
printf("\t%s -f <value_file> [-r] <file> <attr>\n", argv[0]);
goto out2;
}
--
2.7.4

2017-12-14 07:14:40

by Tyson Nottingham

[permalink] [raw]
Subject: [PATCH 4/5] Add missing information to various man pages and usage texts.

badblocks.c: Add -B and -X to usage text.

chattr.1.in: Add P to list of settable attributes.

e2image.8.in, e2image.c: Remove superfluous mention of -r option.

e2undo.8.in, e2undo.c: Add description for -z to man page and add -o and
-z to synopsis and usage text.

e4crypt.8.in: Add -p pad option to relevant command descriptions.

lsattr.1.in: Fix typo.

mke2fs.8.in: Add -C to synopsis. Add MKE2FS_DEVICE_PHYS_SECTSIZE
description and update MKE2FS_DEVICE_SECTSIZE description.

mke2fs.conf.5.in: Add devices stanza summary. Remove base_features and
default_features descriptions from defaults section, as they are
already described in fs_types section. Move enable_periodic_fsck and
force_undo to fs_types section, as they can be set per filesystem
type. Add missing lazy_journal_init and hugefiles_dir descriptions.

tune2fs.8.in: Remove unsupported -p option and deprecated -s option.
Add 64bit, ea_inode, large_dir, and metadata_csum_seed descriptions.

tune2fs.c: Remove unsupported -p option from usage text.
Add mmp_update_interval to extended option usage text.

resize/main.c: Add -S option to usage text.

Signed-off-by: Tyson Nottingham <[email protected]>
---
misc/badblocks.c | 2 +-
misc/chattr.1.in | 2 +-
misc/e2image.8.in | 2 +-
misc/e2image.c | 2 +-
misc/e2undo.8.in | 18 ++++++++++++
misc/e2undo.c | 2 +-
misc/e4crypt.8.in | 8 +++---
misc/e4crypt.c | 4 +--
misc/lsattr.1.in | 4 +--
misc/mke2fs.8.in | 9 ++++++
misc/mke2fs.conf.5.in | 78 ++++++++++++++++++++++++---------------------------
misc/tune2fs.8.in | 33 ++++++++++++++--------
misc/tune2fs.c | 6 ++--
resize/main.c | 3 +-
14 files changed, 103 insertions(+), 70 deletions(-)

diff --git a/misc/badblocks.c b/misc/badblocks.c
index e459391..44252dc 100644
--- a/misc/badblocks.c
+++ b/misc/badblocks.c
@@ -97,7 +97,7 @@ static unsigned int sys_page_size = 4096;
static void usage(void)
{
fprintf(stderr, _(
-"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnf]\n"
+"Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]\n"
" [-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]\n"
" [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
" device [last_block [first_block]]\n"),
diff --git a/misc/chattr.1.in b/misc/chattr.1.in
index 967b808..6a1d446 100644
--- a/misc/chattr.1.in
+++ b/misc/chattr.1.in
@@ -29,7 +29,7 @@ The operator '+' causes the selected attributes to be added to the
existing attributes of the files; '-' causes them to be removed; and '='
causes them to be the only attributes that the files have.
.PP
-The letters 'aAcCdDeijsStTu' select the new attributes for the files:
+The letters 'aAcCdDeijPsStTu' select the new attributes for the files:
append only (a),
no atime updates (A),
compressed (c),
diff --git a/misc/e2image.8.in b/misc/e2image.8.in
index f28a76e..a7bfdf2 100644
--- a/misc/e2image.8.in
+++ b/misc/e2image.8.in
@@ -11,7 +11,7 @@ e2image \- Save critical ext2/ext3/ext4 filesystem metadata to a file
.B \-r|Q
]
[
-.B \-fr
+.B \-f
]
.I device
.I image-file
diff --git a/misc/e2image.c b/misc/e2image.c
index be001f0..5a18bb4 100644
--- a/misc/e2image.c
+++ b/misc/e2image.c
@@ -104,7 +104,7 @@ static int get_bits_from_size(size_t size)

static void usage(void)
{
- fprintf(stderr, _("Usage: %s [ -r|Q ] [ -fr ] device image-file\n"),
+ fprintf(stderr, _("Usage: %s [ -r|Q ] [ -f ] device image-file\n"),
program_name);
fprintf(stderr, _(" %s -I device image-file\n"), program_name);
fprintf(stderr, _(" %s -ra [ -cfnp ] [ -o src_offset ] "
diff --git a/misc/e2undo.8.in b/misc/e2undo.8.in
index da8b918..d8265b1 100644
--- a/misc/e2undo.8.in
+++ b/misc/e2undo.8.in
@@ -17,8 +17,16 @@ e2undo \- Replay an undo log for an ext2/ext3/ext4 filesystem
.B \-n
]
[
+.B \-o
+.I offset
+]
+[
.B \-v
]
+[
+.B \-z
+.I undo_file
+]
.I undo_log device
.SH DESCRIPTION
.B e2undo
@@ -53,6 +61,16 @@ Specify the filesystem's
.TP
.B \-v
Report which block we're currently replaying.
+.TP
+.BI \-z " undo_file"
+Before overwriting a file system block, write the old contents of the block to
+an undo file. This undo file can be used with e2undo(8) to restore the old
+contents of the file system should something go wrong. If the empty string is
+passed as the undo_file argument, the undo file will be written to a file named
+e2undo-\fIdevice\fR.e2undo in the directory specified via the
+\fIE2FSPROGS_UNDO_DIR\fR environment variable.
+
+WARNING: The undo file cannot be used to recover from a power or system crash.
.SH AUTHOR
.B e2undo
was written by Aneesh Kumar K.V. ([email protected])
diff --git a/misc/e2undo.c b/misc/e2undo.c
index 6fb6e44..6443ca2 100644
--- a/misc/e2undo.c
+++ b/misc/e2undo.c
@@ -115,7 +115,7 @@ static char *undo_file;
static void usage(void)
{
fprintf(stderr,
- _("Usage: %s [-f] [-h] [-n] [-v] <transaction file> <filesystem>\n"), prg_name);
+ _("Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"), prg_name);
exit(1);
}

diff --git a/misc/e4crypt.8.in b/misc/e4crypt.8.in
index 6c5e470..169ab58 100644
--- a/misc/e4crypt.8.in
+++ b/misc/e4crypt.8.in
@@ -2,19 +2,19 @@
.SH NAME
e4crypt \- ext4 filesystem encryption utility
.SH SYNOPSIS
-.B e4crypt add_key -S \fR[\fB -k \fIkeyring\fR ] [\fB-v\fR] [\fB-q\fR] [ \fI path\fR ... ]
+.B e4crypt add_key -S \fR[\fB -k \fIkeyring\fR ] [\fB-v\fR] [\fB-q\fR] \fR[\fB -p \fIpad\fR ] [ \fIpath\fR ... ]
.br
.B e4crypt new_session
.br
.B e4crypt get_policy \fIpath\fR ...
.br
-.B e4crypt set_policy \fIpolicy path\fR ...
+.B e4crypt set_policy \fR[\fB -p \fIpad\fR ] \fIpolicy path\fR ...
.SH DESCRIPTION
.B e4crypt
performs encryption management for ext4 file systems.
.SH COMMANDS
.TP
-.B e4crypt add_key -S \fR[\fB -k \fIkeyring\fR ] [\fB-v\fR] [\fB-q\fR] [ \fI path\fR ... ]
+.B e4crypt add_key -S \fR[\fB -k \fIkeyring\fR ] [\fB-v\fR] [\fB-q\fR] \fR[\fB -p \fIpad\fR ] [ \fIpath\fR ... ]
Prompts the user for a passphrase and inserts it into the specified
keyring. If no keyring is specified, e4crypt will use the session
keyring if it exists or the user session keyring if it does not.
@@ -30,7 +30,7 @@ Print the policy for the directories specified on the command line.
Give the invoking process (typically a shell) a new session keyring,
discarding its old session keyring.
.TP
-.B e4crypt set_policy \fIpolicy path\fR ...
+.B e4crypt set_policy \fR[\fB -p \fIpad\fR ] \fIpolicy path\fR ...
Sets the policy for the directories specified on the command line.
All directories must be empty to set the policy; if the directory
already has a policy established, e4crypt will validate that the
diff --git a/misc/e4crypt.c b/misc/e4crypt.c
index 7b65d14..c1ec9ab 100644
--- a/misc/e4crypt.c
+++ b/misc/e4crypt.c
@@ -641,7 +641,7 @@ static void do_help(int argc, char **argv, const struct cmd_desc *cmd);

#define add_key_desc "adds a key to the user's keyring"
#define add_key_help \
-"e4crypt add_key -S salt [ -k keyring ] [-v] [-q] [ path ... ]\n\n" \
+"e4crypt add_key -S salt [ -k keyring ] [-v] [-q] [ -p pad ] [ path ... ]\n\n" \
"Prompts the user for a passphrase and inserts it into the specified\n" \
"keyring. If no keyring is specified, e4crypt will use the session\n" \
"keyring if it exists or the user session keyring if it does not.\n\n" \
@@ -708,7 +708,7 @@ static void do_add_key(int argc, char **argv, const struct cmd_desc *cmd)

#define set_policy_desc "sets a policy for directories"
#define set_policy_help \
-"e4crypt set_policy policy path ... \n\n" \
+"e4crypt set_policy [ -p pad ] policy path ... \n\n" \
"Sets the policy for the directories specified on the command line.\n" \
"All directories must be empty to set the policy; if the directory\n" \
"already has a policy established, e4crypt will validate that it the\n" \
diff --git a/misc/lsattr.1.in b/misc/lsattr.1.in
index bb15769..4d02a95 100644
--- a/misc/lsattr.1.in
+++ b/misc/lsattr.1.in
@@ -30,8 +30,8 @@ List all files in directories, including files that start with `.'.
List directories like other files, rather than listing their contents.
.TP
.B \-l
-Print the options using a long names instead of a single
-character abbreviation.
+Print the options using long names instead of single
+character abbreviations.
.TP
.B \-p
List the file's project number.
diff --git a/misc/mke2fs.8.in b/misc/mke2fs.8.in
index 766bf52..7b989e0 100644
--- a/misc/mke2fs.8.in
+++ b/misc/mke2fs.8.in
@@ -18,6 +18,10 @@ mke2fs \- create an ext2/ext3/ext4 filesystem
.I block-size
]
[
+.B \-C
+.I cluster-size
+]
+[
.B \-d
.I root-directory
]
@@ -792,6 +796,11 @@ If set to non-zero integer value, its value is used to determine first meta
block group. This is mostly for debugging purposes.
.TP
.BI MKE2FS_DEVICE_SECTSIZE
+If set to non-zero integer value, its value is used to determine logical
+sector size of the
+.IR device .
+.TP
+.BI MKE2FS_DEVICE_PHYS_SECTSIZE
If set to non-zero integer value, its value is used to determine physical
sector size of the
.IR device .
diff --git a/misc/mke2fs.conf.5.in b/misc/mke2fs.conf.5.in
index 21a0c88..cbd1700 100644
--- a/misc/mke2fs.conf.5.in
+++ b/misc/mke2fs.conf.5.in
@@ -78,7 +78,7 @@ used by
.BR mke2fs (8).
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.
+stanza, or by a command-line option provided by the user.
.TP
.I [fs_types]
Contains relations which define defaults that should be used for specific
@@ -89,6 +89,9 @@ the
options to
.BR mke2fs (8),
respectively.
+.TP
+.I [devices]
+Contains relations which define defaults for specific devices.
.SH THE [options] STANZA
The following relations are defined in the
.I [options]
@@ -106,47 +109,6 @@ The following relations are defined in the
.I [defaults]
stanza.
.TP
-.I base_features
-This relation specifies the filesystems features which are enabled in
-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]
-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
-.I default_features
-in the filesystem or usage type subsection of
-.IR [fs_types] ,
-and by the
-.B -O
-command-line option
-to
-.BR mke2fs (8).
-.TP
-.I enable_periodic_fsck
-This boolean relation specifies whether periodic filesystem checks should be
-enforced at boot time. If set to true, checks will be forced every
-180 days, or after a random number of mounts. These values may
-be changed later via the
-.B -i
-and
-.B -c
-command-line options to
-.BR tune2fs (8).
-.TP
-.I force_undo
-This boolean relation, if set to a value of true, forces
-.B mke2fs
-to always try to create an undo file, even if the undo file might be
-huge and it might extend the time to create the filesystem image
-because the inode table isn't being initialized lazily.
-.TP
.I fs_type
This relation specifies the default filesystem type if the user does not
specify it via the
@@ -301,6 +263,17 @@ whose subsections define the
relation, only the last will be used by
.BR mke2fs (8).
.TP
+.I enable_periodic_fsck
+This boolean relation specifies whether periodic filesystem checks should be
+enforced at boot time. If set to true, checks will be forced every
+180 days, or after a random number of mounts. These values may
+be changed later via the
+.B -i
+and
+.B -c
+command-line options to
+.BR tune2fs (8).
+.TP
.I errors
Change the behavior of the kernel code when errors are detected.
In all cases, a filesystem error will cause
@@ -333,6 +306,13 @@ a named feature. Each
relation specified in the fs_types list will be applied in the order
found in the fs_types list.
.TP
+.I force_undo
+This boolean relation, if set to a value of true, forces
+.B mke2fs
+to always try to create an undo file, even if the undo file might be
+huge and it might extend the time to create the filesystem image
+because the inode table isn't being initialized lazily.
+.TP
.I default_features
This relation specifies set of features which should be enabled or
disabled after applying the features listed in the
@@ -375,6 +355,16 @@ initialization noticeably, but it requires the kernel to finish
initializing the filesystem in the background when the filesystem is
first mounted.
.TP
+.I lazy_journal_init
+This boolean relation specifies whether the journal inode should be
+lazily initialized. It only has meaning if the has_journal feature is
+enabled. If lazy_journal_init is true, the journal inode will not be
+fully zeroed out by
+.BR mke2fs .
+This speeds up filesystem initialization noticeably, but carries some
+small risk if the system crashes before the journal has been overwritten
+entirely one time.
+.TP
.I journal_location
This relation specifies the location of the journal.
.TP
@@ -448,6 +438,10 @@ to be placed near the beginning of the file system (by disabling the
backup superblocks, using the packed_meta_blocks option, etc.), the data
blocks of the pre-allocated files will be contiguous.
.TP
+.I hugefiles_dir
+This relation specifies the directory where huge files are created,
+relative to the filesystem root.
+.TP
.I hugefiles_uid
This relation controls the user ownership for all of the files and
directories created by the
diff --git a/misc/tune2fs.8.in b/misc/tune2fs.8.in
index b1f43ec..740d166 100644
--- a/misc/tune2fs.8.in
+++ b/misc/tune2fs.8.in
@@ -45,18 +45,10 @@ tune2fs \- adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems
.RI [^]mount-options [,...]
]
[
-.B \-p
-.I mmp_update_interval
-]
-[
.B \-r
.I reserved-blocks-count
]
[
-.B \-s
-.I sparse-super-flag
-]
-[
.B \-u
.I user
]
@@ -537,12 +529,22 @@ The following filesystem features can be set or cleared using
.BR tune2fs :
.RS 1.2i
.TP
+.B 64bit
+Enable the file system to be larger than 2^32 blocks.
+.TP
.B dir_index
Use hashed b-trees to speed up lookups for large directories.
.TP
.B dir_nlink
Allow more than 65000 subdirectories per directory.
.TP
+.B ea_inode
+Allow the value of each extended attribute to be placed in the data blocks of a
+separate inode if necessary, increasing the limit on the size and number of
+extended attributes per file.
+.B Tune2fs
+currently only supports setting this filesystem feature.
+.TP
.B encrypt
Enable file system level encryption.
.B Tune2fs
@@ -574,6 +576,11 @@ Setting the filesystem feature is equivalent to using the
.B \-j
option.
.TP
+.B large_dir
+Increase the limit on the number of files per directory.
+.B Tune2fs
+currently only supports setting this filesystem feature.
+.TP
.B huge_file
Support files larger than 2 terabytes in size.
.TP
@@ -583,6 +590,13 @@ Filesystem can contain files that are greater than 2GB.
.B metadata_csum
Store a checksum to protect the contents in each metadata block.
.TP
+.B metadata_csum_seed
+Allow the filesystem to store the metadata checksum seed in the
+superblock, enabling the administrator to change the UUID of a filesystem
+using the
+.B metadata_csum
+feature while it is mounted.
+.TP
.B mmp
Enable or disable multiple mount protection (MMP) feature.
.TP
@@ -640,9 +654,6 @@ and
.BR flex_bg
features are only supported by the ext4 filesystem.
.TP
-.BI \-p " mmp_check_interval"
-Set the desired MMP check interval in seconds. It is 5 seconds by default.
-.TP
.BI \-r " reserved-blocks-count"
Set the number of reserved filesystem blocks.
.TP
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index d0a18a1..c33fb9d 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -137,9 +137,8 @@ static void usage(void)
"[-g group]\n"
"\t[-i interval[d|m|w]] [-j] [-J journal_options] [-l]\n"
"\t[-m reserved_blocks_percent] [-o [^]mount_options[,...]]\n"
- "\t[-p mmp_update_interval] [-r reserved_blocks_count] "
- "[-u user]\n"
- "\t[-C mount_count] [-L volume_label] [-M last_mounted_dir]\n"
+ "\t[-r reserved_blocks_count] [-u user] [-C mount_count]\n"
+ "\t[-L volume_label] [-M last_mounted_dir]\n"
"\t[-O [^]feature[,...]] [-Q quota_options]\n"
"\t[-E extended-option[,...]] [-T last_check_time] "
"[-U UUID]\n\t[-I new_inode_size] [-z undo_file] device\n"),
@@ -2195,6 +2194,7 @@ static int parse_extended_opts(ext2_filsys fs, const char *opts)
"\tclear_mmp\n"
"\thash_alg=<hash algorithm>\n"
"\tmount_opts=<extended default mount options>\n"
+ "\tmmp_update_interval=<mmp update interval in seconds>\n"
"\tstride=<RAID per-disk chunk size in blocks>\n"
"\tstripe_width=<RAID stride*data disks in blocks>\n"
"\ttest_fs\n"
diff --git a/resize/main.c b/resize/main.c
index aa16077..600e820 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -47,7 +47,8 @@ static char *device_name, *io_options;
static void usage (char *prog)
{
fprintf (stderr, _("Usage: %s [-d debug_flags] [-f] [-F] [-M] [-P] "
- "[-p] device [-b|-s|new_size] [-z undo_file]\n\n"),
+ "[-p] device [-b|-s|new_size] [-S RAID-stride] "
+ "[-z undo_file]\n\n"),
prog);

exit (1);
--
2.7.4

2017-12-14 07:14:53

by Tyson Nottingham

[permalink] [raw]
Subject: [PATCH 5/5] Fix minor typos in libext2fs documentation.

Signed-off-by: Tyson Nottingham <[email protected]>
---
doc/libext2fs.texinfo | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/doc/libext2fs.texinfo b/doc/libext2fs.texinfo
index 7ce74ba..1c3731f 100644
--- a/doc/libext2fs.texinfo
+++ b/doc/libext2fs.texinfo
@@ -164,7 +164,7 @@ using @code{ext2fs_flush}.

Most libext2fs functions take a filesystem handle of type
@code{ext2_filsys}. A filesystem handle is created either by opening
-an existing function using @code{ext2fs_open}, or by initializing a new
+an existing filesystem using @code{ext2fs_open}, or by initializing a new
filesystem using @code{ext2fs_initialize}.

@deftypefun errcode_t ext2fs_open (const char *@var{name}, int @var{flags}, int @var{superblock}, int @var{block_size}, io_manager @var{manager}, ext2_filsys *@var{ret_fs})
@@ -186,7 +186,7 @@ filesystem. Normally this is determined automatically from the
filesystem superblock. If @var{block_size} is non-zero, it must match
the block size found in the superblock, or the error
@code{EXT2_ET_UNEXPECTED_BLOCK_SIZE} will be returned. The
-@var{block_size} parameter is also used to help fund the superblock when
+@var{block_size} parameter is also used to help find the superblock when
@var{superblock} is non-zero.

The @var{flags} argument contains a bitmask of flags which control how
@@ -472,7 +472,7 @@ via @var{got}.
@deftypefun errcode_t ext2fs_file_write (ext2_file_t @var{file}, const void *@var{buf}, unsigned int @var{nbytes}, unsigned int *@var{written})
Write @var{wanted} bytes of data from the buffer @var{buf} to the
current file position of @var{file}. The number of bytes that was
-actually written is returned via @var{got}.
+actually written is returned via @var{written}.
@end deftypefun

@c ----------------------------------------------------------------------
@@ -739,20 +739,20 @@ contain valid block entries.

@deftypefun errcode_t ext2fs_read_dir_block (ext2_filsys @var{fs}, blk_t @var{block}, void *@var{buf})

-This function reads a directory block, performing any necessary
+This function reads a directory block, performing
byte swapping if necessary.
@end deftypefun

@deftypefun errcode_t ext2fs_write_dir_block (ext2_filsys @var{fs}, blk_t @var{block}, void *@var{buf})

-This function writes a directory block, performing any necessary
+This function writes a directory block, performing
byte swapping if necessary.
@end deftypefun

@deftypefun errcode_t ext2fs_new_dir_block (ext2_filsys @var{fs}, ext2_ino_t @var{dir_ino}, ext2_ino_t @var{parent_ino}, char **@var{block})

This function creates a new directory block in @var{block}. If
-@var{dir_ino} is non-zero, then @var{dir_info} and @var{parent_ino} is used
+@var{dir_ino} is non-zero, then @var{dir_ino} and @var{parent_ino} are used
to initialize directory entries for @file{.} and @file{..}, respectively.
@end deftypefun

@@ -1157,7 +1157,7 @@ trying to turn an inode number into a pathname.

@deftypefun errcode_t ext2fs_init_dblist (ext2_filsys @var{fs}, ext2_dblist *@var{ret_dblist})

-Creates a dblist data structure and return it in @var{ret_dblist}.
+Creates a dblist data structure and returns it in @var{ret_dblist}.
@end deftypefun

@deftypefun void ext2fs_free_dblist (ext2_dblist @var{dblist})
@@ -1234,7 +1234,7 @@ Frees an icount structure.

@deftypefun errcode_t ext2fs_icount_fetch (ext2_icount_t @var{icount}, ext2_ino_t @var{ino}, __u16 *@var{ret})

-Returns in @var{ret} fetches the count for a particular inode @var{ino}.
+Returns in @var{ret} the count for a particular inode @var{ino}.
@end deftypefun

@deftypefun errcode_t ext2fs_icount_increment (ext2_icount_t @var{icount}, ext2_ino_t @var{ino}, __u16 *@var{ret})
--
2.7.4

2017-12-14 17:24:36

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 0/5] e2fsprogs: Update man pages, usage texts, and docs.

On Wed, Dec 13, 2017 at 11:13:08PM -0800, Tyson Nottingham wrote:
> These patches add missing feature descriptions and command arguments to
> man pages and usage texts. They also fix some minor typos.

Thanks so much for working on the e2fsprogs documentation! It is an
often an underappreciated work, and I'm glad to have someone working
to improve the documentation.

> The patches are based off of the master branch of e2fsprogs. Should I be
> working from a different branch? Also, I did not update any of the
> localization files. Do I need to worry about handling that?

The maint branch corresponds to the 1.43.x release series, and the
master and next branches present what will (soon) become the 1.44(.x)
release. There will be at least one more 1.43.x release before I
release 1.44, so it's not that of an issue.

I can handle trying to apply these patches to the maint branch,
pulling out the feature improvements that only appear in the master
branch and applying that in a separate patch for the master branch.
But in the future, it would be preferable for bug fixes and doc fixes
to be done against the maint branch (if applicable). The master/next
branch will get fixes via git merges.

Cheers,

- Ted

2017-12-14 19:59:36

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 1/5] Add missing features and mount options to ext4 man page.

On Wed, Dec 13, 2017 at 11:13:09PM -0800, Tyson Nottingham wrote:
> Add descriptions for ea_inode, large_dir, metadata_csum, and
> metadata_csum_seed features, as well as nombcache and prjquota
> mount options. Also, update a couple of descriptions.
>
> Signed-off-by: Tyson Nottingham <[email protected]>

Thanks, applied (split between the master and maint branches).

- Ted

2017-12-15 04:44:37

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 2/5] Add missing information to e2fsck man pages and usage text.

On Wed, Dec 13, 2017 at 11:13:10PM -0800, Tyson Nottingham wrote:
> Add environment variable and defaults stanza information.
> Also, update a couple of descriptions.
>
> Signed-off-by: Tyson Nottingham <[email protected]>

Applied to the maint branch, thanks.

- Ted

2017-12-15 04:50:02

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 3/5] Add missing information to debugfs man pages and usage texts.

On Wed, Dec 13, 2017 at 11:13:11PM -0800, Tyson Nottingham wrote:
> Add descriptions for dump_unused, get_quota, list_quota,
> set_current_time, show_debugfs_params, and supported_features
> commands to debugfs man page. Add various missing command
> arguments and correct a few typos in man page and usage texts.
>
> Signed-off-by: Tyson Nottingham <[email protected]>

Applied to the maint branch, thanks.

- Ted

2017-12-21 16:11:34

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 4/5] Add missing information to various man pages and usage texts.

On Wed, Dec 13, 2017 at 11:13:12PM -0800, Tyson Nottingham wrote:
> badblocks.c: Add -B and -X to usage text.
>
> chattr.1.in: Add P to list of settable attributes.
>
> e2image.8.in, e2image.c: Remove superfluous mention of -r option.
>
> e2undo.8.in, e2undo.c: Add description for -z to man page and add -o and
> -z to synopsis and usage text.
>
> e4crypt.8.in: Add -p pad option to relevant command descriptions.
>
> lsattr.1.in: Fix typo.
>
> mke2fs.8.in: Add -C to synopsis. Add MKE2FS_DEVICE_PHYS_SECTSIZE
> description and update MKE2FS_DEVICE_SECTSIZE description.
>
> mke2fs.conf.5.in: Add devices stanza summary. Remove base_features and
> default_features descriptions from defaults section, as they are
> already described in fs_types section. Move enable_periodic_fsck and
> force_undo to fs_types section, as they can be set per filesystem
> type. Add missing lazy_journal_init and hugefiles_dir descriptions.
>
> tune2fs.8.in: Remove unsupported -p option and deprecated -s option.
> Add 64bit, ea_inode, large_dir, and metadata_csum_seed descriptions.
>
> tune2fs.c: Remove unsupported -p option from usage text.
> Add mmp_update_interval to extended option usage text.
>
> resize/main.c: Add -S option to usage text.
>
> Signed-off-by: Tyson Nottingham <[email protected]>

Applied to the maint branch, thanks.

- Ted

2017-12-21 16:12:18

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 5/5] Fix minor typos in libext2fs documentation.

On Wed, Dec 13, 2017 at 11:13:13PM -0800, Tyson Nottingham wrote:
> Signed-off-by: Tyson Nottingham <[email protected]>
> ---
> doc/libext2fs.texinfo | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)

Applied to the maint branch, thanks.

- Ted