From: Jeff Moyer Date: Mon, 14 Feb 2011 16:58:00 +0000 (-0500) Subject: 164: write a multiple of 4k instead of 512 X-Git-Tag: v1.1.0~88 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5483e761dc98886d0a59561dec7d1a610461c699;p=xfstests-dev.git 164: write a multiple of 4k instead of 512 When running test 164 against a 4k sector device, the initial file write of 50K fails with EINVAL, since it isn't a multiple of the device sector size. I fixed this by bumping the amount written to 52K. Signed-off-by: Jeff Moyer Signed-off-by: Christoph Hellwig --- diff --git a/164 b/164 index 03784c64..2aea3535 100755 --- a/164 +++ b/164 @@ -78,7 +78,7 @@ _test_eof_hole() # on a BB boundary rm -f $testfile $XFS_IO_PROG -f -d \ - -c 'pwrite -b 50k 0 50k' \ + -c 'pwrite -b 52k 0 52k' \ -c 'truncate 100k' \ -c 'pread -b 200k 0 200k' \ $testfile | _filter_io @@ -90,7 +90,7 @@ _test_eof_hole() boundary_minus1=`expr 100 \* 1024 - 1` echo "boundary_minus1 = $boundary_minus1" $XFS_IO_PROG -f -d \ - -c 'pwrite -b 50k 0 50k' \ + -c 'pwrite -b 52k 0 52k' \ -c "truncate $boundary_minus1" \ -c 'pread -b 200k 0 200k' \ $testfile | _filter_io @@ -102,7 +102,7 @@ _test_eof_hole() boundary_plus1=`expr 100 \* 1024 + 1` echo "boundary_plus1 = $boundary_plus1" $XFS_IO_PROG -f -d \ - -c 'pwrite -b 50k 0 50k' \ + -c 'pwrite -b 52k 0 52k' \ -c "truncate $boundary_plus1" \ -c 'pread -b 200k 0 200k' \ $testfile | _filter_io @@ -117,7 +117,7 @@ _test_eof_unwritten_extent() $XFS_IO_PROG -f -d \ -c 'resvsp 0 100k' \ -c 'truncate 100k' \ - -c 'pwrite -b 50k 0 50k' \ + -c 'pwrite -b 52k 0 52k' \ -c 'pread -b 200k 0 200k' \ $testfile | _filter_io $XFS_IO_PROG -c 'bmap -vp' $testfile | _filter_bmap @@ -130,7 +130,7 @@ _test_eof_unwritten_extent() $XFS_IO_PROG -f -d \ -c "resvsp 0 $boundary_minus1" \ -c "truncate $boundary_minus1" \ - -c 'pwrite -b 50k 0 50k' \ + -c 'pwrite -b 52k 0 52k' \ -c 'pread -b 200k 0 200k' \ $testfile | _filter_io $XFS_IO_PROG -c 'bmap -vp' $testfile | _filter_bmap @@ -143,7 +143,7 @@ _test_eof_unwritten_extent() $XFS_IO_PROG -f -d \ -c "resvsp 0 $boundary_plus1" \ -c "truncate $boundary_plus1" \ - -c 'pwrite -b 50k 0 50k' \ + -c 'pwrite -b 52k 0 52k' \ -c 'pread -b 200k 0 200k' \ $testfile | _filter_io $XFS_IO_PROG -c 'bmap -vp' $testfile | _filter_bmap diff --git a/164.out b/164.out index df67f059..d55e7b50 100644 --- a/164.out +++ b/164.out @@ -1,35 +1,35 @@ QA output created by 164 -wrote 51200/51200 bytes at offset 0 -50 KiB, 1 ops +wrote 53248/53248 bytes at offset 0 +52 KiB, 1 ops read 102400/204800 bytes at offset 0 100 KiB, 1 ops boundary_minus1 = 102399 -wrote 51200/51200 bytes at offset 0 -50 KiB, 1 ops +wrote 53248/53248 bytes at offset 0 +52 KiB, 1 ops read 102399/204800 bytes at offset 0 100 KiB, 1 ops boundary_plus1 = 102401 -wrote 51200/51200 bytes at offset 0 -50 KiB, 1 ops +wrote 53248/53248 bytes at offset 0 +52 KiB, 1 ops read 102401/204800 bytes at offset 0 100 KiB, 1 ops -wrote 51200/51200 bytes at offset 0 -50 KiB, 1 ops +wrote 53248/53248 bytes at offset 0 +52 KiB, 1 ops read 102400/204800 bytes at offset 0 100 KiB, 1 ops boundary_minus1 = 102399 -wrote 51200/51200 bytes at offset 0 -50 KiB, 1 ops +wrote 53248/53248 bytes at offset 0 +52 KiB, 1 ops read 102399/204800 bytes at offset 0 100 KiB, 1 ops boundary_plus1 = 102401 -wrote 51200/51200 bytes at offset 0 -50 KiB, 1 ops +wrote 53248/53248 bytes at offset 0 +52 KiB, 1 ops read 102401/204800 bytes at offset 0 100 KiB, 1 ops