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

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