xfs
[Top] [All Lists]

Re: [PATCH] xfsqa: reduce error output on 229

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfsqa: reduce error output on 229
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Thu, 14 Apr 2011 22:51:06 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1302838310-28095-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1302838310-28095-1-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
On 4/14/11 10:31 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> Once we get one short write, we know the test has failed. We don't
> ened to keep writing and getting more short writes and spewing
> thousands of errors to the console.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

> ---
>  src/t_holes.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/src/t_holes.c b/src/t_holes.c
> index eba310a..b111baf 100644
> --- a/src/t_holes.c
> +++ b/src/t_holes.c
> @@ -29,8 +29,10 @@ int main(int argc, char **argv)
>               for (j = 0; j < 1024; j++)
>                       buf[j]  = i | i << 5;
>  
> -             if (write(fd,buf,253*4*sizeof(int))!= 253*4*sizeof(int))
> +             if (write(fd,buf,253*4*sizeof(int))!= 253*4*sizeof(int)) {
>                       printf("Write did not return correct amount\n");
> +                     exit(EXIT_FAILURE);
> +             }
>  
>               if ((i % 9) == 0 && i < 9001)
>                       lseek(fd, 4096 * 110,SEEK_CUR);

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