It is clear from several reports that the e2fsck inode badness is not working correctly for duplicate blocks. It is intended functionality is that if some inode is reporting duplicate blocks, but also had other errors such as bad flags, size, blocks, mode, etc. then it is likely that this inode is actually corrupt/garbage and should be cleared instead of spending a long time to clone the file blocks just to have a garbage inode with some other file's data.
Avoiding the e2fsck pass1b/1c/1d process can save a very significant amount of time when running on a large/corrupt filesystem, and would be preferable to trying to repair such inodes.
It has also been suggested that instead of the "inode badness" feature (which is not yet landed upstream because it touches a lot of different code) that instead e2fsck check all of the inodes in an itable block together, and if there is corruption across multiple inodes in that block block that this be used as the "badness" for the inode, and consider those inodes as targets for deletion if they are also found to be sharing blocks. I think it is potentially dangerous to always clear a block of inodes that are all showing corruption, in case this corruption is systematic (e.g. clearing some feature flag, updating the checksum after filesystem UUID was changed, etc).
Andreas Dilger (adilger@whamcloud.com) merged in patch https://review.whamcloud.com/41450/
Subject:
LU-5949e2fsck: call delete_inode() properlyProject: tools/e2fsprogs
Branch: master-lustre
Current Patch Set:
Commit: 4aea203f2d490f53596eb21233bf0c186a5b3679