Re: [PATCH 09/13] xfs_scrub: fix per-thread counter error communication problems

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

 



On Wed, Oct 09, 2019 at 04:46:36PM -0500, Eric Sandeen wrote:
> On 9/25/19 4:34 PM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > 
> > Fix all the places in the per-thread counter functions either we fail to
> > check for runtime errors or fail to communicate them properly to
> > callers.  Then fix all the callers to report the error messages instead
> > of hiding them.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > ---
> >  scrub/counter.c     |   33 ++++++++++++++++++---------------
> >  scrub/counter.h     |    6 +++---
> >  scrub/phase3.c      |   23 +++++++++++++++++------
> >  scrub/progress.c    |   12 +++++++++---
> >  scrub/read_verify.c |    9 ++++++---
> >  5 files changed, 53 insertions(+), 30 deletions(-)
> 
> ...
> 
> > @@ -282,5 +282,8 @@ uint64_t
> >  read_verify_bytes(
> >  	struct read_verify_pool		*rvp)
> >  {
> > -	return ptcounter_value(rvp->verified_bytes);
> > +	uint64_t			ret;
> > +
> > +	ptcounter_value(rvp->verified_bytes, &ret);
> > +	return ret;
> >  }
> 
> IMHO this is a confusing use of "ret" which is normally return status but
> here it is the sum?  And errors are ignored? We just get a ret ("sum") of zero?

For now, yes.  The patch "xfs_scrub: fix read-verify pool error
communication problems" in the next series will fix a bunch of error
handling problems in the read_verify.c functions.

(I'm trying only to change the direct ptvar.c callers in this patch...)

--D



[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