]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2fsck: in rehash, mark newly allocated extent blocks as found
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 11 Dec 2013 01:22:07 +0000 (17:22 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 12 Dec 2013 18:27:08 +0000 (13:27 -0500)
commit4b58df1a53f517d700d921714610d1cec524dc92
tree2850abcb5c2d65c6db041c72eabf067caf32eb20
parent042a0f52ec79e448fd798df7757c6addeb00aede
e2fsck: in rehash, mark newly allocated extent blocks as found

When we're rehashing directories, it's possible that an extent block
(or a map block) could be (silently) allocated by the underlying
libext2fs when expanding the directory.  This silent allocation is not
captured in block_found_map, which is disastrous if later the rehash
process expands another directory and uses that same block from
before without realizing that it's now in use.

Therefore, if we notice that the free block count has dropped by more
than what e2fsck allocated itself during the expansion, we iterate the
directory's blocks a second time to ensure that these silent
allocations are marked in the found blocks bitmap.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/pass3.c