Whamcloud - gitweb
e2fsck: clear i_block[] when there are too many bad mappings on a special inode
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 27 Jan 2015 18:12:12 +0000 (13:12 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 27 Jan 2015 18:12:31 +0000 (13:12 -0500)
commit3ee29465810887548cb293ccacb1cc810af61a4c
tree09a874d2cd51f7c7509564c64a7c694950cc2d4e
parente263765505914063d59d3752454b3abf2c1ade3c
e2fsck: clear i_block[] when there are too many bad mappings on a special inode

If we decide to clear a special inode because of bad mappings, we need
to zero the i_block array.  The clearing routine depends on setting
i_links_count to zero to keep us from re-checking the block maps,
but that field isn't checked for special inodes.  Therefore, if we
haven't erased the mappings, check_blocks will restart fsck and fsck
will try to check the blocks again, leading to an infinite loop.

(This seems easy to trigger if the bootloader inode extent map is
corrupted.)

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