public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: _test_generic_punch: Obtain block size from $TEST_DIR
@ 2013-08-28  6:24 chandan
  2013-08-28 16:32 ` Eric Sandeen
  2013-08-29 15:48 ` Rich Johnston
  0 siblings, 2 replies; 3+ messages in thread
From: chandan @ 2013-08-28  6:24 UTC (permalink / raw)
  To: xfs; +Cc: Eric Sandeen, Eric Sandeen, sekharan

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@linux.vnet.ibm.com>
---
 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" \
-- 
1.8.3.1


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfstests: _test_generic_punch: Obtain block size from $TEST_DIR
  2013-08-28  6:24 [PATCH] xfstests: _test_generic_punch: Obtain block size from $TEST_DIR chandan
@ 2013-08-28 16:32 ` Eric Sandeen
  2013-08-29 15:48 ` Rich Johnston
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2013-08-28 16:32 UTC (permalink / raw)
  To: chandan; +Cc: Eric Sandeen, sekharan, xfs

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@linux.vnet.ibm.com>

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

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

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" \
> 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfstests: _test_generic_punch: Obtain block size from $TEST_DIR
  2013-08-28  6:24 [PATCH] xfstests: _test_generic_punch: Obtain block size from $TEST_DIR chandan
  2013-08-28 16:32 ` Eric Sandeen
@ 2013-08-29 15:48 ` Rich Johnston
  1 sibling, 0 replies; 3+ messages in thread
From: Rich Johnston @ 2013-08-29 15:48 UTC (permalink / raw)
  To: chandan; +Cc: xfs

Thanks for the patch Chadan, it has been committed.

--Rich

commit f6406daca8a91216019e62c8924c171e8a414d05
Author: chandan <chandan@linux.vnet.ibm.com>
Date:   Wed Aug 28 06:24:10 2013 +0000

     xfstests: _test_generic_punch: Obtain block size from $TEST_DIR

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-29 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-28  6:24 [PATCH] xfstests: _test_generic_punch: Obtain block size from $TEST_DIR chandan
2013-08-28 16:32 ` Eric Sandeen
2013-08-29 15:48 ` Rich Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox