]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2fsck: only release clusters when shortening a directory during a rehash
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 11 Dec 2013 01:23:12 +0000 (17:23 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 16 Dec 2013 04:52:23 +0000 (23:52 -0500)
commit5797cb017cb8accbab8c69aaf83269c5d2d72e4e
tree404afc85920947a30fd785439898f3c2109b803a
parent230272c15a71edfd53bc805adf560d0386dddff3
e2fsck: only release clusters when shortening a directory during a rehash

When the rehash process is running on a bigalloc filesystem, it
compresses all the directory entries and hash structures into the
beginning of the directory file and then uses block_iterate3() to free
the blocks off the end of the file.  It seems to call
ext2fs_block_alloc_stats2() for every block in a cluster, which is
unfortunate because this function allocates and frees entire clusters
(and updates the summary counts accordingly).  In this case e2fsck
writes out incorrect summary counts.

Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/rehash.c