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 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?



[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