[Top] [All Lists]

Re: [PATCH] xfs_repair: validate & fix inode CRCs

To: Brian Foster <bfoster@xxxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxxxxx>
Subject: Re: [PATCH] xfs_repair: validate & fix inode CRCs
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Mon, 22 Sep 2014 09:45:48 -0500
Cc: xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140922131855.GA29156@xxxxxxxxxxxxxxx>
References: <5418AC01.30006@xxxxxxxxxx> <20140922131855.GA29156@xxxxxxxxxxxxxxx>
On 9/22/14 8:18 AM, Brian Foster wrote:

> So we verify each inode first in process_inode_chunk() and then follow
> on with process_dinode(). There's a comment further up in
> process_dinode_int() that indicates we explicitly do not check the crc
> at that point, presumably considering verify_mode. I only see one call
> to each of verify_inode() and process_dinode() (in that order). The
> other process_dinode_int() caller is verify_uncertain_dinode(), which
> looks like it occurs ultimately from process_uncertain_aginodes() in
> phase 3.
> I suppose that logic makes sense, but it's not totally clear tbh. We do
> fix up the crc in the caller if the inode is marked dirty. It also seems
> like it's possible to modify the inode before this point where we check
> the crc. Given that, it seems like we could just add an "if
> (!verify_mode)" hunk to the preexisting hascrc() hunk further up in the
> function..?

Ugh, I am not sure how I missed that we could have already modified it.
Ok, that throws the whole thing out, I'll take another look.


<Prev in Thread] Current Thread [Next in Thread>