Re: [PATCH 5/6] xfs_scrub: make phase 4 go straight to fstrim if nothing to fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 12, 2022 at 05:34:37PM -0500, Eric Sandeen wrote:
> On 5/5/22 11:08 AM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@xxxxxxxxxx>
> > 
> > If there's nothing to repair in phase 4, there's no need to hold up the
> > FITRIM call to do the summary count scan that prepares us to repair
> > filesystem metadata.  Rearrange this a bit.
> > 
> > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> 
> > +
> > +	/*
> > +	 * If errors remain on the filesystem, do not trim anything.  We don't
> > +	 * have any threads running, so it's ok to skip the ctx lock here.
> > +	 */
> > +	if (ctx->corruptions_found || ctx->unfixable_errors == 0)
> > +		return 0;
> > +
> > +maybe_trim:
> > +	trim_filesystem(ctx);
> > +	return 0;
> >  }
> 
> I'm a little confused by the unfixable_errors test, is that correct?
> 
> Why do you bail out if there are 0 unfixable errors?

Oooops.  That was a logic inversion bug. :(

--D

> -Eric



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux