public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic: require filesize to be greater than fs block size in generic/240
@ 2013-12-06  9:24 Stanislav Kholmanskikh
  2013-12-06  9:39 ` Stanislav Kholmanskikh
  2013-12-11  6:55 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Stanislav Kholmanskikh @ 2013-12-06  9:24 UTC (permalink / raw)
  To: xfs; +Cc: vasily.isaenko

If we execute generic/240 on a fs which has its fs block size greater
than 64k (for example, NFS), this test will fail with:

  io_submit failed: Invalid argument

This will happen because in src/aio-dio-regress/aiodio_sparse2.c this
expression

  num_aio = filesize / step;

will set num_aio to 0 and this means that no io_setup() will happen
before calling io_submit().

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
 tests/generic/240 |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/generic/240 b/tests/generic/240
index e26f495..acf0515 100755
--- a/tests/generic/240
+++ b/tests/generic/240
@@ -62,14 +62,19 @@ rm -f $TEST_DIR/aiodio_sparse
 
 logical_block_size=`_min_dio_alignment $TEST_DEV`
 fs_block_size=`stat -f $TEST_DIR | grep "Block size:" | awk '{print $3}'`
+file_size=65536
 
 if [ $fs_block_size -le $logical_block_size ]; then
 	_notrun "fs block size must be larger than the device block size.  fs block size: $fs_block_size, device block size: $logical_block_size"
 fi
 
-# 2 threads, fs block sized writes, 64k filesize, stride through file by
+if [ $file_size -lt $fs_block_size ]; then
+	file_size=$fs_block_size
+fi
+
+# 2 threads, fs block sized writes, filesize, stride through file by
 # fs block size, start at logical block size offset
-$AIO_TEST -i 2 -w $fs_block_size -s 64k -n $fs_block_size -o $logical_block_size "$TEST_DIR/aiodio_sparse"
+$AIO_TEST -i 2 -w $fs_block_size -s $file_size -n $fs_block_size -o $logical_block_size "$TEST_DIR/aiodio_sparse"
 
 status=$?
 exit
-- 
1.7.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] generic: require filesize to be greater than fs block size in generic/240
  2013-12-06  9:24 [PATCH] generic: require filesize to be greater than fs block size in generic/240 Stanislav Kholmanskikh
@ 2013-12-06  9:39 ` Stanislav Kholmanskikh
  2013-12-11  6:55 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Stanislav Kholmanskikh @ 2013-12-06  9:39 UTC (permalink / raw)
  To: xfs; +Cc: vasily.isaenko


On 12/06/2013 01:24 PM, Stanislav Kholmanskikh wrote:
> If we execute generic/240 on a fs which has its fs block size greater
> than 64k (for example, NFS), this test will fail with:
>
>    io_submit failed: Invalid argument
>
> This will happen because in src/aio-dio-regress/aiodio_sparse2.c this
> expression
>
>    num_aio = filesize / step;
>
> will set num_aio to 0 and this means that no io_setup() will happen
> before calling io_submit().
Actually, I mean "... no io_prep_pwrite() will happen before calling 
io_submit()". It's a typo.

_______________________________________________
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] generic: require filesize to be greater than fs block size in generic/240
  2013-12-06  9:24 [PATCH] generic: require filesize to be greater than fs block size in generic/240 Stanislav Kholmanskikh
  2013-12-06  9:39 ` Stanislav Kholmanskikh
@ 2013-12-11  6:55 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2013-12-11  6:55 UTC (permalink / raw)
  To: Stanislav Kholmanskikh; +Cc: vasily.isaenko, xfs

> -# 2 threads, fs block sized writes, 64k filesize, stride through file by
> +if [ $file_size -lt $fs_block_size ]; then
> +	file_size=$fs_block_size
> +fi

We'd need the file size to be a multiple of the block size to make this
useful, I'd take 4 or 8 times as a useful default.

_______________________________________________
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-12-11  6:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-06  9:24 [PATCH] generic: require filesize to be greater than fs block size in generic/240 Stanislav Kholmanskikh
2013-12-06  9:39 ` Stanislav Kholmanskikh
2013-12-11  6:55 ` Christoph Hellwig

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