Commit Graph

3 Commits (master)

Author SHA1 Message Date
Darrick J. Wong 95eca2e922 e2fsck: check htree leaf block checksums
We weren't verifying the checksum of an htree leaf block due to a
coding error that marked all htree blocks as not having checksums.
While we're at it, fix the error message that gets displayed so that
it doesn't print a meaningless block offset.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-07-22 00:06:43 -04:00
Darrick J. Wong d02d019557 e2fsck: only complain about no-checksum directory blocks once
If a directory block lacks space for a checksum and the user directs
e2fsck to fix the directory block (by rehashing it), don't complain a
second time about the checksum verification failure when we get to the
end of the directory block.

Also, don't complain about broken HTREE directories if we're already
planning to rebuild the HTREE directory.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-12-13 21:55:12 -05:00
Darrick J. Wong 8e203507b3 tests: add tests for directory entry blocks with checksum errors
Add some regression tests to examine how e2fsck handles directory
entry blocks and htree blocks with (a) malformed directory entries;
(b) incorrect checksums; or (c) obviously garbage entries.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-08-02 23:48:58 -04:00