xfs
[Top] [All Lists]

Re: [PATCH 05/10] xfs_repair: force not-so-bad bmbt blocks back through

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH 05/10] xfs_repair: force not-so-bad bmbt blocks back through the verifier
From: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>
Date: Mon, 17 Aug 2015 16:48:14 -0700
Cc: "Darrick J. Wong" <djwong@xxxxxxxxxxxxxxxx>, david@xxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <55D24EB3.2040506@xxxxxxxxxxx>
References: <20150815014338.1839.37405.stgit@xxxxxxxxxxxxxxxx> <20150815014410.1839.33268.stgit@xxxxxxxxxxxxxxxx> <55D24EB3.2040506@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Aug 17, 2015 at 04:14:27PM -0500, Eric Sandeen wrote:
> On 8/14/15 8:44 PM, Darrick J. Wong wrote:
> > If during prefetch we encounter a bmbt block that fails the CRC check
> > due to corruption in the unused part of the block, force the buffer
> > back through the non-prefetch verifiers later so that the CRC is
> > updated.  Otherwise, the bad checksum goes unfixed and the kernel will
> > still flag the bmbt block as invalid.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > ---
> >  repair/prefetch.c |    8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > 
> > diff --git a/repair/prefetch.c b/repair/prefetch.c
> > index 8b261ae..fc7097f 100644
> > --- a/repair/prefetch.c
> > +++ b/repair/prefetch.c
> > @@ -276,6 +276,14 @@ pf_scan_lbtree(
> >  
> >     XFS_BUF_SET_PRIORITY(bp, isadir ? B_DIR_BMAP : B_BMAP);
> >  
> > +   /*
> > +    * Make this bmbt buffer go back through the verifiers later so that
> > +    * we correct checksum errors stemming from bitflips in the unused
> > +    * parts of the bmbt block.
> > +    */
> > +   if (bp->b_error == -EFSBADCRC || bp->b_error == -EFSCORRUPTED)
> > +           bp->b_flags |= LIBXFS_B_UNCHECKED;
> 
> Hm, so why check EFSCORRUPTED?  If you're doing what the comment says, why
> not just EFSBADCRC?  EFSCORRUPTED means that in-use portions are bad, no?

You're right, I only need to hook onto EFSBADCRC.  I probably got too used
to seeing checks for both everywhere. 8)

--D

> 
> -Eric
> 
> > +
> >     rc = (*func)(XFS_BUF_TO_BLOCK(bp), level - 1, isadir, args);
> >  
> >     libxfs_putbuf(bp);
> > 
> > _______________________________________________
> > xfs mailing list
> > xfs@xxxxxxxxxxx
> > http://oss.sgi.com/mailman/listinfo/xfs
> > 
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

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