Commit Graph

22 Commits (master)

Author SHA1 Message Date
Theodore Ts'o 749f07121d Add configure --disable-tdb which disables e2fsck's scratch_files feature
The scratch_files feature is not really needed except on 32-bit
platforms, since tdb's performance is pretty awful given how we are
using it.  Maybe SQLite would be faster, but for 64-bit platforms,
enabling swap works fairly well, especially using the rbtree for the
bitmap abstraction.

We leave tdb for Android since it's unlikely that someone will be
trying to connect petabyte+ sized file systems to a mobile handset.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-29 21:52:52 -04:00
Theodore Ts'o 78b7cd3b1e Clean up spelling errors and other nits in man pages
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-21 13:40:49 -04:00
Theodore Ts'o f9b16db868 More man page and usage message fixups
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 23:23:14 -04:00
Darrick J. Wong a5abfe0382 e2fsck: read-ahead metadata during passes 1, 2, and 4
e2fsck pass1 is modified to use the block group data prefetch function
to try to fetch the inode tables into the pagecache before it is
needed.  We iterate through the blockgroups until we have enough inode
tables that need reading such that we can issue readahead; then we sit
and wait until the last inode table block read of the last group to
start fetching the next bunch.

pass2 is modified to use the dirblock prefetching function to prefetch
the list of directory blocks that are assembled in pass1.  We use the
"iterate a subset of a dblist" and avoid copying the dblist.  Directory
blocks are fetched incrementally as we walk through the directory
block list.  In previous iterations of this patch we would free the
directory blocks after processing, but the performance hit to e2fsck
itself wasn't worth it.  Furthermore, it is anticipated that most
users will then mount the FS and start using the directories, so they
may as well remain in the page cache.

pass4 is modified to prefetch the block and inode bitmaps in
anticipation of pass 5, because pass4 is entirely CPU bound.

In general, these mechanisms can decrease fsck time by 10-40%, if the
host system has sufficient memory and the storage system can provide a
lot of IOPs.  Pretty much any storage system capable of handling
multiple IOs in-flight at any time will see a fairly large performance
boost.  (Single-issue USB mass storage disks seem to suffer badly.)

By default, the readahead buffer size will be set to the size of a block
group's inode table (which is 2MiB for a regular ext4 FS).  The -E
readahead_kb= option can be given to specify the amount of memory to
use for readahead or zero to disable it entirely; or an option can be
given in e2fsck.conf.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-04-21 10:40:21 -04:00
Theodore Ts'o 4f06566b78 e2fsck.conf: clarify man page's description of accept_time_fudge
Addresses-Debian-Bug: #719189

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-04 19:11:36 -05:00
Theodore Ts'o c0a849660d e2fsck: add e2fsck.conf options for extra reporting
Add report_time, report_verbose, and report_features options to
e2fsck.conf which enable additional, more verbose reporting by e2fsck.
This is useful for large cloud installations where there are a large
number file systems being managed, and where it may not be obvious
from the e2fsck log files exactly how a particular file system is
configured.

The report_time and report_verbose options, which are the same as the
-tt and -v command line options, respectively, are useful because they
are options specific to e2fsck, and the fsck program does not have a
way of passing certain options only to a specific /sbin/fsck.<fstype>
program.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 17:44:11 -04:00
Theodore Ts'o c1732c5a9a e2fsck.conf.5: add buggy_init_scripts to the man page
We have renamed buggy_init_scripts to accept_time_fudge.  Explain this
so that people who find buggy_init_scripts in older e2fsck.conf files
understand what is going on.

Addresses-Debian-Bug: #646963

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-04-09 14:46:43 -04:00
Theodore Ts'o b0e91c8925 e2fsck: add logging capability
Add the ability to log messages about a file system to a specified
directory, using a file name templace that can be specified in
/etc/e2fsck.conf.  This allows us to suppress the output of overly
verbose e2fsck outputs while still allowing the full logging output to
go to an appropriate file.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-03-18 15:40:47 -04:00
Theodore Ts'o d2594cc863 e2fsck: add the max_count_problems setting in e2fsck.conf
Also add appropriate documentation for options/max_count_problems and
problems/0xXXXXXX/max_count settings in /etc/e2fsck.conf

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-03-16 12:13:31 -04:00
Eric Sandeen d4a9330212 e2fsprogs: man page typo fixes
Fix a few typos in manpages.

Reported-by: Branislav Náter <bnater@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-03-18 15:03:15 -04:00
Theodore Ts'o 7599038836 e2fsck: Add the ability to force a problem to not be fixed
The boolean options "force_no" in the problems stanza of e2fsck.conf
allows a particular problem code be treated as if the user will answer
"no" to the question of whether a particular problem should be fixed
--- even if e2fsck is run with the -y option.

As an example use case, suppose a distribution had widely deployed a
version of the kernel where under some circumstances, the EOFBLOCKS_FL
flag would be left set even though it should not be left set, and a
customer had a workload which exercised the fencepost error all the
time, resulting in many large number of inodes that had EOFBLOCKS_FL
set erroneously.  Enough, in fact, the e2fsck runs were taking too
long.  (There was such a bug in the kernel, which was fixed by commit
58590b06d in 2.6.36).

Leaving EOFBLOCKS_FL set when it should not be isn't a huge deal, and
is certainly than having high availability timeout alerts going off
left and right.  So in this case, the best fix might be to put the
following in /etc/e2fsck.conf:

[problems]
0x010060 = {			# PR_1_EOFBLOCKS_FL_SET
	 force_no = true
	 no_ok = true
	 no_nomsg = true
}

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-12-06 10:10:33 -05:00
Theodore Ts'o 6a81b40ae7 e2fsck.conf.5: Clarify man page
Clarify the e2fsck.conf(5) man page to make it clear that it applies
for ext4 file systems.

Addresses-Debian-Bug: #591083

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-11-26 18:07:32 -05:00
Theodore Ts'o 177839e245 e2fsck: Skip time-based checks if the time looks insane or broken_system_clock
There are broken embedded devices that have system clocks that always
reset to January 1, 1970 whenever they boot (even if no power is
lost).  There are also systems that have super cheap clock crystals
that can be very inaccurate.  So if the option broken_system_clock is
given, disable all time based checks.  E2fsck will also try to detect
incorrect system clock times, and automatically mark the system clock
as insane.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-05-13 17:36:36 -04:00
Theodore Ts'o c70674387e e2fsck: Add new e2fsck.conf option: broken_system_clock
The broken_system_clock allows the time to be in the future when in
preen mode.  It's useful for people who have, as the name implies,
broken system clocks.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-01-04 13:59:04 -05:00
Theodore Ts'o ba5131f6d4 e2fsck: Accept superblock times to be fudged by up to 24 hours by default
Unfortunately, due to Windows' unfortunate design decision to
configure the hardware clock to tick localtime, instead of the more
proper and less error-prone UTC time, many users end up in the
situation where the system clock is incorrectly set at the time when
e2fsck is run.

Historically this was usually due to some distributions having buggy
init scripts and/or installers that didn't correctly detect this case
and take appropriate countermeasures.  However, it's still possible,
despite the best efforts of init script and installer authors to not
be able to detect this misconfiguration, usually due to a buggy or
misconfigured virtualization manager or the installer not having
access to a network time server during the installation process.  So
by default, we allow the superblock times to be fudged by up to 24
hours.  This can be disabled by setting options.accept_time_fudge to
the boolean value of false in e2fsck.conf.  The old
options.buggy_init_scripts is left for backwards compatibility.

Since we are now accepting the 24 hour time fudge by default, there is
no longer a need to install an Ubuntu-specific e2fsck.conf file, so we
can remove it.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-10-16 20:59:20 -04:00
Theodore Ts'o 7dca4c88f1 e2fsck: When repacking directories, leave slack space for more efficiency
If the directory is packed with no slack space, as soon as any new
directory entries are added, leaf nodes end up getting split and
directory ends up getting very inefficient.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-12-25 17:59:36 -05:00
Theodore Ts'o 80875db58a e2fsck: Offer to clear the test_fs flag if ext4 is available
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-10-12 23:12:23 -04:00
Theodore Ts'o 60702c267d Work around lame Ubuntu init scripts / installer bugs
The Ubuntu init scripts don't properly set the system time correctly
from hardware clock if the hardware clock is configured to tick local
time instead of GMT time.

Work around this as best as we can by providing an option in
/etc/e2fsck.conf which can be set on Ubuntu systems:

[options]
	buggy_init_scripts = 1

Addresses-Debian-Bug: #441093
Addresses-Ubuntu-Bug: #131201

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-09-22 20:43:11 -04:00
Theodore Ts'o a4d7d90deb Fix minor typo in e2fsck.conf.5.in man page
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-18 22:12:50 -04:00
Theodore Ts'o 39efa4c500 Update the e2fsck.conf(5) man page to document the [scratch_files] section
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-06 23:32:06 -04:00
Theodore Ts'o 2d1fa59d90 Minor correction to e2fsck.conf man page
Addresses Debian Bug: #369761

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-10-02 08:38:44 -04:00
Theodore Ts'o 1abdba4b64 Add man page documenting the /etc/e2fsck.conf configuration file.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-27 01:03:11 -05:00