]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2fsck: fix bad htree checksums in preen mode
authorTheodore Ts'o <tytso@mit.edu>
Fri, 17 Mar 2023 02:57:10 +0000 (22:57 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 17 Mar 2023 03:35:58 +0000 (23:35 -0400)
commit79a7b5e1f387caf907ec88460cdb39b8364bfb0b
tree5a796284a1a599a77bb8560b1ebf95a01adc7388
parent5df0323e879982a3ee5062b2445456226e8b690f
e2fsck: fix bad htree checksums in preen mode

We attempt to fix directories which have a bad/corrupted htree index
node by completely rebuilding the directory htree nodes.  Since this
is a very safe thing to do and has no risk of losing directory
entries, we've enabled this for preen mode.  Unfortunately, subsequent
index nodes look like empty directory entries that fill the entire
block --- without a checksum at the end of the directory.  So these
nodes will be treated as a completely corrupted directory block, and
this will *not* be fixed while in preen mode.

So add code to treat an empty directory entry which covers the entire
block as valid if the directory is already on the list of inodes to be
rebuilt.

Addresses-Gooogle-Bug: 178607853
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass2.c