diff mbox

[51/47] e2fsck: force-reread of inode from disk when re-checking a checksum error

Message ID 20141204203903.GC10059@birch.djwong.org
State Accepted, archived
Headers show

Commit Message

Darrick Wong Dec. 4, 2014, 8:39 p.m. UTC
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>
---
 e2fsck/pass1.c |    1 +
 1 file changed, 1 insertion(+)

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Theodore Ts'o Dec. 11, 2014, 10:49 p.m. UTC | #1
On Thu, Dec 04, 2014 at 12:39:03PM -0800, Darrick J. Wong wrote:
> 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>

Applied, thanks.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index 82792e4..0073bed 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -671,6 +671,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)