xfs
[Top] [All Lists]

Re: [PATCH 12/32] xfs: verify AGF blocks as they are read from disk

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 12/32] xfs: verify AGF blocks as they are read from disk
From: Phil White <pwhite@xxxxxxx>
Date: Mon, 12 Nov 2012 17:09:00 -0800
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1352721264-3700-13-git-send-email-david@xxxxxxxxxxxxx>
References: <1352721264-3700-1-git-send-email-david@xxxxxxxxxxxxx> <1352721264-3700-13-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
Dave, you botched a copy & paste here:

On Mon, Nov 12, 2012 at 10:54:04PM +1100, Dave Chinner wrote:
> +     agf_ok = agf->agf_magicnum == cpu_to_be32(XFS_AGF_MAGIC) &&
> +             XFS_AGF_GOOD_VERSION(be32_to_cpu(agf->agf_versionnum)) &&
> +             be32_to_cpu(agf->agf_freeblks) <= be32_to_cpu(agf->agf_length) 
> &&
> +             be32_to_cpu(agf->agf_flfirst) < XFS_AGFL_SIZE(mp) &&
> +             be32_to_cpu(agf->agf_fllast) < XFS_AGFL_SIZE(mp) &&
> +             be32_to_cpu(agf->agf_flcount) <= XFS_AGFL_SIZE(mp) &&
> +             be32_to_cpu(agf->agf_flcount) <= XFS_AGFL_SIZE(mp);

See: 
> -     agf_ok =
> -             agf->agf_magicnum == cpu_to_be32(XFS_AGF_MAGIC) &&
> -             XFS_AGF_GOOD_VERSION(be32_to_cpu(agf->agf_versionnum)) &&
> -             be32_to_cpu(agf->agf_freeblks) <= be32_to_cpu(agf->agf_length) 
> &&
> -             be32_to_cpu(agf->agf_flfirst) < XFS_AGFL_SIZE(mp) &&
> -             be32_to_cpu(agf->agf_fllast) < XFS_AGFL_SIZE(mp) &&
> -             be32_to_cpu(agf->agf_flcount) <= XFS_AGFL_SIZE(mp) &&
> -             be32_to_cpu(agf->agf_seqno) == agno;

-Phil

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