Whamcloud - gitweb
e2fsck: force-reread of inode from disk when re-checking a checksum error
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 11 Dec 2014 22:48:03 +0000 (17:48 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 11 Dec 2014 22:48:03 +0000 (17:48 -0500)
When we're rechecking an inode checksum failure, we need to force the
inode to be re-read from disk so that the verification routine runs,
so drop the stashed inode.

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

index af64fd1..14877d7 100644 (file)
@@ -663,6 +663,7 @@ static errcode_t recheck_bad_inode_checksum(ext2_filsys fs, ext2_ino_t ino,
         * Reread inode.  If we don't see checksum error, then this inode
         * has been fixed elsewhere.
         */
+       ctx->stashed_ino = 0;
        retval = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
                                        sizeof(inode));
        if (retval && retval != EXT2_ET_INODE_CSUM_INVALID)