Whamcloud - gitweb
e2fsck: never free critical metadata blocks in the block found map
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 3 Aug 2014 02:18:29 +0000 (22:18 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 3 Aug 2014 02:18:29 +0000 (22:18 -0400)
commit409f3884b54092c4b160e33d731b2218e48dbec3
tree075dc7a272dbf2e2b798bb22f0eda96d71861746
parent8375a881f905be4ee66db24e111b3a70947a12ec
e2fsck: never free critical metadata blocks in the block found map

Don't allow critical metadata blocks to be marked free in the block
found map.  This can theoretically happen on an FS where a first
inode's ETB/indirect map block is in the inode table, the first inode
is itself unclonable (and thus gets deleted) and there are enough
crosslinked files before and after the first inode to use up all the
free blocks during pass 1b.

(I do actually have a test FS image but it's 256M and it proved very
difficult to craft a bite-sized test case that actually hit this bug.)

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