summaryrefslogtreecommitdiff
path: root/e2fsck
AgeCommit message (Collapse)AuthorFilesLines
2006-05-22Fix spelling mistakes in e2fsck, mke2fs.conf, and resize2fs man pagesTheodore Ts'o2-1/+6
Addresses Debian Bugs: #368392, #368393, #368394 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-14Fix memory leak in e2fsck's error pathsTheodore Ts'o3-1/+11
Add missing brelse() calls to avoid memory leaks in error paths. (Thanks to Michael C. Thompson for pointing these out; they were originally found using Coverity.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-13Fix read/write badblocks testing in mke2fs and e2fsckTheodore Ts'o2-1/+6
The exlcusive device safety check that was added inadvertently broke e2fsck -cc and mke2fs -cc since e2fsck and mke2fs hold the device in exclusive access when badblocks is run. So we add a private option to badblocks, -X, which is passed by e2fsck and mke2fs to badblocks to indicate that it is OK to skip the EXT2_MF_BUSY checks. Addresses Debian Bug: #366017 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-08Add support for EXT2_FEATURE_COMPAT_LAZY_BGTheodore Ts'o2-10/+71
This feature is initially intended for testing purposes; it allows an ext2/ext3 developer to create very large filesystems using sparse files where most of the block groups are not initialized and so do not require much disk space. Eventually it could be used as a way of speeding up mke2fs and e2fsck for large filesystem, but that would be best done by adding an RO_COMPAT extension to the filesystem to allow the inode table to be lazily initialized on a per-block basis, instead of being entirely initialized or entirely unused on a per-blockgroup basis. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-27Add badblocks(8) to SEE ALSO section of e2fsck's man page.Theodore Ts'o2-3/+7
Addresses Debian Bug: #347295 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-27Add man page documenting the /etc/e2fsck.conf configuration file.Theodore Ts'o3-2/+186
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-22Tighten up profile parsing code by combining functionsTheodore Ts'o2-68/+55
Integrate profile_std_line() into parse_line(), and profile_parse_file() into profile_update_file() to make the code use less memory. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18Fix format statements to make e2fsprogs programs 32-bit cleanTakashi Sato7-11/+19
Change the format string(%d, %ld) for a block number and inode number to %u or %lu. Signed-off-by: Takashi Sato <sho@tnes.nec.co.jp> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18Change e2fsck to open non-mounted filesystems in exclusive modeTheodore Ts'o2-0/+11
Thanks to Andreas Dilger for this idea. If the filesystem is not mounted, e2fsck will open it in exclusive mode to prevent the a confused/careless system administrator from mounting the filesystem while the filesystem check is taking place, which could cause all sorts of problems. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-10Enhance e2fsck so it can fix external journal hint in the superblock Theodore Ts'o6-0/+60
Check to see if the superblock hint for the external journal needs to be updated, and if so, offer to update it. (Addresses Debian Bug: #355644) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-08Remove e2fsck/malloc.hTheodore Ts'o1-231/+0
(This was an artifact of the migration of the sources from BitKeeper to Mercurial; mea culpa, mea maximum culpa --- Ted) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-29Add a config option which controls whether fs checks are skipped when on batteryTheodore Ts'o2-2/+13
Whether fs checks are skipped when the system is running on battery can be controlled by the new e2fsck.conf option defer_check_on_battery (this option defaults to TRUE). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-29Print an explanation when skipping a check due being on batteryTheodore Ts'o2-3/+13
On Sat, Jan 28, 2006 at 12:53:33PM -0600, Fredrick Knieper wrote: > Package: e2fsprogs > Version: 1.38+1.39-WIP-2005.12.31-1 > > When running fsck at boot or when running e2fsck manually on a device, > fsck will not check a filesystem based on the maximum mount count, > unless a flag such as -f or -c is used to force the filesystem check. What's happening is that when you run on battery, e2fsck will delay running the filesystem check, on the assumption that it is better to defer the check until some time in the future when your laptop is running on AC mains again. This deferral is not infinite, however; if the number of mounts exceeds twice the max mount counts, or if the interval between checks exceeds twice the check interval, e2fsck will force the check even though you are on battery. I've changed the sources to print a message to make this more clear. Addresses Debian Bug: #350306 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-06Add support for quoted strings in tag and section namesTheodore Ts'o2-19/+46
Also changed top-level section name parsing to ignore leading and trailing whitespace. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-05Add support to the profile library for /etc/foo/conf.d style directories Theodore Ts'o2-13/+111
If a directory is passed to profile_init, then read all files which match [0-9a-zA-Z]* in sort order. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-05Fix gcc -Wall warning in profile_helper.cTheodore Ts'o1-1/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-05More profile cleanups: remove prf_data_t data structureTheodore Ts'o2-131/+37
Eliminate the prf_data_t data structure and fold it back into prof_file_t. Eschew needless complexity! Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-05Enhance profile library's parser to accept comments Theodore Ts'o2-29/+59
This also changes syntax accepted by the profile parser. The value of profile relations must not contain spaces unless it is quoted; otherwise the parser will throw an error. Previously something like this was allowed: [liboptions] test = foo bar Now, the relation must be in double quotes in order to be valid, i.e., "foo bar". Comments are allowed anywhere and can be started with either a ';' or a '#' character. The only place where comments will not be intepreted as beginning a comment is in a quoted string. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-04Add syntax error reporting to the profile libraryTheodore Ts'o4-78/+62
E2fsck will now report syntax errors in /etc/e2fsck.conf intead of simply ignoring the config file when there are errors. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-02Simplify profile core functionalityTheodore Ts'o6-549/+426
Boil down and simplify profile.c, and move extra functionality that's not needed into profile_helpers.c Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-02Clean up test driver program for profile.c and #ifdef unused static functionsTheodore Ts'o1-107/+83
Unified batchmode and command-line handling. profile_is_node_final() and profile_find_node_relation() are static, unused functions. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-01Fix profile.c so that com_err.h doesn't have to be installedTheodore Ts'o2-1/+7
Fix #include of com_err.h so that it isn't required that the com_err development environment be installed. (Addresses Debian Bug: #345519) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31Add e2fsck problem handling to be configurableTheodore Ts'o3-4/+48
Add the ability for the e2fsck configuration file to override the behaviour of e2fsck when a particular filesystem problem is encountered. This allows reconnecting an inode to lost+found to not stop the boot sequence, if a system administrator really badly wants this behaviour for some specialized reason, for example. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31Slim down profile.cTheodore Ts'o1-5/+5
#ifdef out functions not needed by e2fsck. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31Add E2FSCK_CONFIG environment variableTheodore Ts'o1-0/+3
Also, use this environtment variable to make sure that a local /etc/e2fsck.conf file will not interfere with the regression test suite. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31Fix incorrect location of prof_err.h in profile.c.Theodore Ts'o2-4/+4
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31Add allow_cancellation config optionTheodore Ts'o2-3/+24
If the e2fsck configuration file sets the allow_cancellation option to be true, then if the filesystem does not have any known problems, and was known to be cleanly unmounted, then let e2fsck exit with a status code of 0 instead of 32 (FSCK_CANCELED) so that the bootup scripts will continue without stopping the boot. (Addresses Debian Bug: #150295) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31Read in /etc/e2fsck.conf configuration file at startupTheodore Ts'o4-1/+17
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-30Add the profile library code to e2fsckTheodore Ts'o7-30/+2683
The profile library was originally written by Theodore Ts'o in 1995 for use in the MIT Kerberos v5 library. It has been modified/enhanced/bug-fixed over time by other members of the MIT Kerberos team. This version was originally taken from the Kerberos v5 distribution, version 1.4.2, and radically simplified for use in e2fsprogs. (Support for locking for multi-threaded operations, being able to modify and update the configuration file programmatically, and Mac/Windows portability have been removed. It has been folded into a single C source file to make it easier to fold into an application program.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-19Automatically fix superblock times in the futureTheodore Ts'o2-2/+12
If the superblock last mount time or last write time is in the future, fix this automatically if e2fsck is in preeen mode, since Debian's boot sequence bogusly doesn't set the time correctly until potentially very late in the bootup process, and this can cause false positives that will cause users' systems to fail to booting. (Addresses Debian Bugs #343662 and #343645) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-09Clarify the e2fsck man page regarding the -c optionTheodore Ts'o2-4/+8
A user was confused about whether or not e2fsck -c performed a destructive test on the filesystem, since it stated that -cc resulted in a non-destructive read/write test. Clarify that -c does a read/only test. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-09Make e2fsck -cc warn on a read-only root filesystemTheodore Ts'o2-5/+11
Don't let the user run e2fsck -ccn on the root partition, without warning that he or she might be doing something Really Stupid. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-09Fix typo in e2fsck error message.Theodore Ts'o2-1/+4
Thanks to Solar Designer for pointing out the missing preposition. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-09Clarify description of the -p, -n, and -y options in the e2fsck man page.Theodore Ts'o2-3/+34
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-24E2fsck: fix future times in the superblock's last mount or last write fieldsTheodore Ts'o6-0/+44
Detect if the superblock's last mount field or last write field is in the future, and offer to fix if so. (Addresses Debian Bug #327580) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-25Fix use-after-free bug of e2fsck context structure.Theodore Ts'o2-3/+5
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-25Fix false positives from valgrind: memcpy via no-op structure copyTheodore Ts'o2-1/+8
Don't do a structure copy via an assignment in e2fsck's pass #1 when it is a no-op in order to avoid false positives from valgrind. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-04Make e2fsck Pass 1C header consistent with the other headersTheodore Ts'o2-1/+4
Removed the period from the Pass 1C header to make it consistent with the other e2fsck pass headers.
2005-07-04[BUGFIX]: E2fsck will segfault on disconnected inode with extended attribute(s)Theodore Ts'o2-20/+38
This was actually caused by two bugs. The first bug is that if the inode has been fully fixed up, the code will attempt to remove the inode from the inode_bad_map without checking to see if this bitmap is present. Since it is cleared at the end of pass 2, if e2fsck_process_bad_inode is called in pass 4 (as it is for disconnected inodes), this would result in a core dump. The first bug was mostly hidden by a second bug, which caused e2fsck_process_bad_inode() to consider all inodes without an extended attribute to be not fixed. Note: This bug was introduced in e2fsprogs 1.36. (Addresses Debian Bug: #316736)
2005-06-30Update for e2fsprogs 1.38 release.Theodore Ts'o1-0/+4
2005-06-26Update typos in changelogTheodore Ts'o1-2/+3
2005-06-20Fix e2fsprogs messages for grammar and consistency, based on suggestionsTheodore Ts'o2-8/+16
from Benno Schulenberg. Add missing _() so all strings can be internationalized.
2005-06-20Fix minor typo introduced in e2fsck man page.Theodore Ts'o1-1/+1
2005-06-19Make the e2fsck man page clear that the -c, -l, and -L options areTheodore Ts'o2-0/+25
never safe to use on a mounted filesystem, and in general, running e2fsck on mounted filesystems is a bad idea.
2005-06-19Clean up e2fsck problem description messages for typo's and to make themTheodore Ts'o3-73/+82
easier to understand (sorry, translators). Add new @m (multiply-claimed) and @n (invalid) expansions for e2fsck problem descriptions. Add Dutch translation, and update French translation. Add an explanation of how the @-expansion and %-exapansion works in e2fsck/problem.c to make life easier for the translators. Synchronize and update po files.
2005-06-05Fix a minor spelling typo in blkid's man page, and update e2fsck's REPORTINGTheodore Ts'o2-3/+28
BUGS section to request that e2fsck's messages printed in English, and to send a raw e2image filesystem dump if possible.
2005-05-06Update "make depend" information. Fixes SMP parallel build problem.Theodore Ts'o1-87/+97
(Addresses Sourceforge Bug: #1157933)
2005-05-05Corrects a few mistakes in the fsck man page, wraps two overlong lines,Theodore Ts'o2-1/+8
and changes "bad" to "invalid" in some messages to avoid confusion with "bad blocks" in the e2fsck, mke2fs, and badblocks programs. Thanks to Benno Schulenberg. (Addresses Sourceforge Bug: #1189803)
2005-04-16Fix spelling mistakes in man pages. (Addresses Debian Bugs: #304591, Theodore Ts'o2-2/+7
#304592, #304594, #304597, #304593)
2005-04-14Don't offer to update or clone the resize inode when e2fsck deals withTheodore Ts'o2-1/+4
multiply claimed blocks.