Whamcloud - gitweb
tune2fs: zero inode table when removing checksums
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 16 Sep 2013 13:41:15 +0000 (09:41 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 16 Sep 2013 13:41:15 +0000 (09:41 -0400)
commitfa58fa530a1c2f71f8ace81dca9f4b73774bf777
tree63d5908d12b5bcfdc54688b6bc7b040ceaba42dd
parent2db19bce8146a63b1cef19fe4628014c7f7de816
tune2fs: zero inode table when removing checksums

When disabling group checksums, we have to initialize the inode table.  Right
now tune2fs doesn't do this; it merely punts to e2fsck to clean up the mess.
Unfortunately, if the "uninitialized" inode table contains things that look
like inodes (i_link_count > 0, specifically), the e2fsck tries to recover these
inodes.  This leads to it misinterpreting i_blocks as a block map, at which
point it needlessly resurrects phantom inodes and crosslinked file repairs.  As
part of initializing the block bitmaps, we must also mark block group metadata
blocks in use.

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