Re: [PATCH 11/13] xfs_scrub: check progress bar timedwait failures

[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>
> 
> Check for failures in the timedwait for progressbar reporting.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

> ---
>  scrub/progress.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/scrub/progress.c b/scrub/progress.c
> index 5fda4ccb..e93b607f 100644
> --- a/scrub/progress.c
> +++ b/scrub/progress.c
> @@ -130,7 +130,9 @@ progress_report_thread(void *arg)
>  			abstime.tv_sec++;
>  			abstime.tv_nsec -= NSEC_PER_SEC;
>  		}
> -		pthread_cond_timedwait(&pt.wakeup, &pt.lock, &abstime);
> +		ret = pthread_cond_timedwait(&pt.wakeup, &pt.lock, &abstime);
> +		if (ret && ret != ETIMEDOUT)
> +			break;
>  		if (pt.terminate)
>  			break;
>  		ret = ptcounter_value(pt.ptc, &progress_val);
> 



[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