xfstests: _test_generic_punch: Obtain block size from $TEST_DIR
PATCH 1/1 xfstests: _test_generic_punch: Obtain block size from $TEST_DIR
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.
--- common/punch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/punch +1 -1
@@ -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" \
Signature · 7 lines
1.8.3.1 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 5 lines · chandan
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 <[email protected]>
Oof, yes, this looks right. Seems strange, I thought < 4k was working on x86; maybe just by accident.
I'll take another look at your other patch in light of this fix.
Thanks!
-Eric
Quoted 10 lines
--- common/punch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/punch +0
-0
common/punch _test_generic_punch() · line 526
Quoted 8 lines
common/punch +1
-1@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Thanks for the patch Chadan, it has been committed.
--Rich
commit f6406daca8a91216019e62c8924c171e8a414d05
Author: chandan <[email protected]> Date: Wed Aug 28 06:24:10 2013 +0000
xfstests: _test_generic_punch: Obtain block size from $TEST_DIR
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs