xfs
[Top] [All Lists]

Re: [PATCH] xfstests: _test_generic_punch: Obtain block size from $TEST_

To: chandan <chandan@xxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] xfstests: _test_generic_punch: Obtain block size from $TEST_DIR
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Wed, 28 Aug 2013 11:32:14 -0500
Cc: xfs@xxxxxxxxxxx, Eric Sandeen <sandeen@xxxxxxxxxxx>, sekharan@xxxxxxxxxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <2632380.gCujKLhaaV@xxxxxxxxxxxxxxxxxxxxx>
References: <2632380.gCujKLhaaV@xxxxxxxxxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
On 8/28/13 1:24 AM, chandan wrote:
> The current code incorrectly gets block size information from $TEST_DEV
> instead of from $TEST_DIR. This returns the block size of the filesystem
> hosting the device file rather than that of the filesystem on $TEST_DEV.
> 
> Signed-off-by: chandan <chandan@xxxxxxxxxxxxxxxxxx>

Oof, yes, this looks right.  Seems strange, I thought < 4k was working
on x86; maybe just by accident.

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

I'll take another look at your other patch in light of this fix.

Thanks!

-Eric

> ---
>  common/punch | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/punch b/common/punch
> index 7b3c009..a49638c 100644
> --- a/common/punch
> +++ b/common/punch
> @@ -520,7 +520,7 @@ _test_generic_punch()
>       if [ "$remove_testfile" ]; then
>               rm -f $testfile
>       fi
> -     block_size=`stat -f $TEST_DEV | grep "Block size" | cut -d " " -f3`
> +     block_size=`stat -f $TEST_DIR | grep "Block size" | cut -d " " -f3`
>       $XFS_IO_PROG -f -c "truncate $block_size" \
>               -c "pwrite 0 $block_size" $sync_cmd \
>               -c "$zero_cmd 128 128" \
> 

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