e2fsprogs/e2fsck
Eric Whitney b0f5fa880c e2fsck: fix multiply-claimed block quota accounting when deleting files
As e2fsck processes each file in pass1, the actual file system quota is
increased by the number of blocks discovered in the file.  This can
include both non-multiply-claimed and multiply-claimed blocks, if the
latter exist.  However, if a file containing multiply-claimed blocks
is then deleted in pass1b, those blocks are not taken into account when
decreasing the actual quota.  In this case, the new quota values written
to the file system by e2fsck overstate the space actually consumed.
And, e2fsck must be run twice on the file system to fully correct
quota.

Fix this by counting multiply-claimed blocks as a debit to quota when
deleting files in pass1b.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
2017-05-24 21:34:23 -04:00
..
Android.mk Android.mk: Replace _host suffix with more standard -host suffix 2016-03-15 01:25:11 -04:00
badblocks.c e2fsck: fix memory leak on error path in read_bad_blocks_files() 2014-01-07 09:10:24 -05:00
CHANGES Many files: 1997-04-26 13:21:57 +00:00
dirinfo.c Add configure --disable-tdb which disables e2fsck's scratch_files feature 2016-05-29 21:52:52 -04:00
dx_dirinfo.c configure: remove support to disable htree support 2015-07-03 16:29:35 -04:00
e2fsck.8.in e2fsck: allow extent tree optimization to be disabled 2017-04-21 03:33:47 -04:00
e2fsck.c e2fsck: report the exit value in the logfile 2017-03-01 14:33:45 -05:00
e2fsck.conf.5.in e2fsck: allow extent tree optimization to be disabled 2017-04-21 03:33:47 -04:00
e2fsck.h e2fsck: allow extent tree optimization to be disabled 2017-04-21 03:33:47 -04:00
ea_refcount.c e2fsck: fix printf conversion specs in ea_refcount.c 2013-12-24 22:50:23 -05:00
ehandler.c e2fsck: on read error, don't rewrite blocks past the end of the fs 2015-01-27 13:12:37 -05: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
extents.c e2fsck: allow extent tree optimization to be disabled 2017-04-21 03:33:47 -04:00
flushb.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
iscan.c debugfs, e2fsck: fix s_desc_size handling 2013-12-24 22:50:19 -05:00
jfs_user.h e2fsck: fix an alignment problem which causes sparc64 in the journal code 2016-09-01 01:01:53 -04:00
journal.c e2fsck: exit with exit status 0 if no errors were fixed 2017-02-16 22:02:35 -05:00
logfile.c e2fsck: close the progress_fd in the logfile child process 2015-01-12 19:42:29 -05:00
Makefile.in Stop installing mkfs.ext4dev and fsck.ext4dev 2017-01-31 17:58:08 -05:00
Makefile.pq Many files: 1997-11-14 05:23:04 +00:00
message.c e2fsck: clean up feature test macros with predicate functions 2015-10-24 00:44:40 -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: fix ASAN error when using 128 byte inodes 2017-04-21 03:33:47 -04:00
pass1b.c e2fsck: fix multiply-claimed block quota accounting when deleting files 2017-05-24 21:34:23 -04:00
pass2.c misc: fix all the compiler warnings 2017-03-03 10:02:14 -05:00
pass3.c e2fsck: fix quota accounting to use cluster units 2017-04-13 11:47:12 -04:00
pass4.c e2fsck: fix project quota support 2016-05-21 22:18:16 -04:00
pass5.c e2fsck,resize2fs: fix gcc -Wall nits 2016-05-29 13:36:20 -04:00
problem.c e2fsck: make problem comments match error messages 2017-02-17 14:55:09 -05:00
problem.h e2fsck: make problem comments match error messages 2017-02-17 14:55:09 -05:00
problemP.h e2fsck: exit with exit status 0 if no errors were fixed 2017-02-16 22:02:35 -05:00
quota.c Clean up codes for adding new quota type 2016-03-06 15:56:24 -05:00
readahead.c misc: fix Coverity bugs 2015-05-16 18:32:33 -04:00
recovery.c Avoid crashing on unaligned pointers from corrupted file systems 2016-09-04 15:06:32 -04:00
region.c misc: fix compiler warnings and minor build errors 2014-11-07 21:23:41 -05:00
rehash.c Fix Android build warnings 2016-05-29 23:51:08 -04:00
revoke.c e2fsck: fix buffer overrun in revoke block scanning 2015-05-16 20:50:21 -04:00
scantest.c e2fsprogs: introduce ext2fs_close_free() helper 2014-07-05 21:06:48 -04:00
sigcatcher.c Eliminate unused variable and unused label warnings from Android build 2015-07-13 10:47:16 -04:00
super.c e2fsck: enforce that the extra isize fields in the superblock are sane 2016-09-04 17:41:20 -04:00
unix.c e2fsck: allow extent tree optimization to be disabled 2017-04-21 03:33:47 -04:00
util.c e2fsck: report the exit value in the logfile 2017-03-01 14:33:45 -05:00