e2fsprogs/e2fsck
Theodore Ts'o e9e96584b3 e2fsck: update global free blocks/inodes count when truncating orphan inodes
By the time we start processing the orphan inode list, we have already
calculated the total expected number of free blocks and inodes in
ctx->free_{blocks,inodes}.  This is used to set the free blocks/inodes
count in the superblock in the case where we don't need to do a full
e2fsck.

We need to update these expected free block counts as we process the
orphan inode list so that superblock values are set correctly.
Otherwise we could have the following happen:

% e2fsck /tmp/test.img
e2fsck 1.42.3 (14-May-2012)
Truncating orphaned inode 12 (uid=0, gid=0, mode=0100644, size=0)
Setting free blocks count to 46 (was 79)
/tmp/test.img: clean, 12/16 files, 54/100 blocks

% e2fsck /tmp/test.img
e2fsck 1.42.3 (14-May-2012)
Setting free blocks count to 79 (was 46)
/tmp/test.img: clean, 12/16 files, 21/100 blocks

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-06-11 22:18:25 -04:00
..
CHANGES Many files: 1997-04-26 13:21:57 +00:00
Makefile.in libquota: remove unnecessary definitions 2012-06-04 12:51:55 -04:00
Makefile.pq Many files: 1997-11-14 05:23:04 +00:00
argv_parse.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
argv_parse.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
badblocks.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
crc32.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
crc32defs.h Only use __builtin_expect if __GNUC__ > 3 2008-07-13 16:06:56 -04:00
dict.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
dict.h Fixx gcc -Wall nitpicks. 2003-07-06 00:36:48 -04:00
dirinfo.c e2fsck: speed up runs when using tdb for large atypical filesystems 2011-11-29 11:24:52 -05:00
dx_dirinfo.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
e2fsck.8.in e2fsck.8: fix spelling mistake in man page 2011-09-20 13:21:28 -04:00
e2fsck.c e2fsck: add logging capability 2012-03-18 15:40:47 -04:00
e2fsck.conf.5.in e2fsck.conf.5: add buggy_init_scripts to the man page 2012-04-09 14:46:43 -04:00
e2fsck.h e2fsck: add logging capability 2012-03-18 15:40:47 -04:00
ea_refcount.c e2fsck: simplify binary search in ea_refcount.c 2011-09-30 16:38:26 -04:00
ehandler.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
emptydir.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
extend.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
flushb.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
gen_crc32table.c Fix gcc -Wall warnings in e2fsck 2008-06-07 11:04:10 -04:00
iscan.c Don't assume that the presence of mntent.h means that setmntent() exists 2012-04-05 15:31:09 -07:00
jfs_user.h e2fsck: fix 64-bit journal support 2012-05-21 21:30:45 -04:00
journal.c e2fsck: correctly propagate error from journal to superblock 2012-06-10 23:35:43 -04:00
logfile.c libext2fs: don't inline ext2fs_open_file() and ext2fs_stat() 2012-05-28 10:54:12 -04:00
message.c e2fsck: add logging capability 2012-03-18 15:40:47 -04:00
mtrace.awk Many files: 1997-04-26 13:21:57 +00:00
mtrace.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
mtrace.h ChangeLog, super.c: 2001-01-12 21:05:57 +00:00
pass1.c e2fsck: only check for zero-length leaf extents 2012-06-11 00:25:45 -04:00
pass1b.c e2fsck: use different bitmap types as appropriate 2011-12-18 01:12:44 -05:00
pass2.c e2fsck: use different bitmap types as appropriate 2011-12-18 01:12:44 -05:00
pass3.c e2fsck: use different bitmap types as appropriate 2011-12-18 01:12:44 -05:00
pass4.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
pass5.c e2fsck: quiet harmless inode/blocks errors 2012-04-24 16:22:48 -04:00
problem.c e2fsck: quiet harmless inode/blocks errors 2012-04-24 16:22:48 -04:00
problem.h e2fsck,libquota: Update quota only if its inconsistent 2012-04-24 14:51:54 -04:00
problemP.h e2fsck: add ability to limit the # of problems of a particular type 2012-03-14 17:44:54 -04:00
prof_err.et Fix more spelling errors found by translators and add pluralization 2011-10-09 17:54:23 -04:00
profile.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
profile.h mke2fs: Allow specifying reserved_ratio via mke2fs.conf 2011-05-14 23:34:48 -04:00
profile_helpers.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
profile_helpers.h Simplify profile core functionality 2006-01-02 22:04:41 -05:00
quota.c e2fsck: Fix check for hidden quota files 2012-04-24 14:36:42 -04:00
recovery.c e2fsck: fix 64-bit journal support 2012-05-21 21:30:45 -04:00
region.c misc: quiet minor compiler errors 2011-09-24 13:00:24 -04:00
rehash.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
revoke.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
scantest.c Don't assume that the presence of mntent.h means that setmntent() exists 2012-04-05 15:31:09 -07:00
sigcatcher.c e2fsck: make e2fsck sigcatcher use SIGCHLD rather than SIGCLD 2011-10-05 14:47:09 -04:00
super.c e2fsck: update global free blocks/inodes count when truncating orphan inodes 2012-06-11 22:18:25 -04:00
unix.c e2fsck: allow checking on mounted root fs 2012-05-31 16:41:41 -04:00
util.c e2fsck: add logging capability 2012-03-18 15:40:47 -04:00