* [PATCH] xfststs: add a helper to get the minimum dio size
@ 2013-11-06 10:59 Christoph Hellwig
2013-11-12 17:35 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Christoph Hellwig @ 2013-11-06 10:59 UTC (permalink / raw)
To: xfs
Various tests opencode checks to find out the minimum support direct I/O
size. Replace those with a generic helper that handles network filesystems as
well. Also remove the Linux 2.4 workaround we had in once place.
Signed-off-by: Christoph Hellwig <hch@lst.de>
diff --git a/common/rc b/common/rc
index ea3af12..64139c8 100644
--- a/common/rc
+++ b/common/rc
@@ -2179,6 +2179,21 @@ _scale_fsstress_args()
echo $args
}
+#
+# Return the logical block size if running on a block device,
+# else substitute the page size.
+#
+_min_dio_alignment()
+{
+ dev=$1
+
+ if [ -b "$dev" ]; then
+ blockdev --getss $dev
+ else
+ $here/src/feature -s
+ fi
+}
+
run_check()
{
echo "# $@" >> $seqres.full 2>&1
diff --git a/tests/generic/091 b/tests/generic/091
index cee012d..d0f5800 100755
--- a/tests/generic/091
+++ b/tests/generic/091
@@ -54,11 +54,7 @@ run_fsx()
}
psize=`$here/src/feature -s`
-bsize=`blockdev --getss $TEST_DEV`
-kernel=`uname -r | sed -e 's/\(2\..\).*/\1/'`
-
-# 2.4 Linux kernels support bsize aligned direct I/O only
-[ "$HOSTOS" = "Linux" -a "$kernel" = "2.4" ] && bsize=$psize
+bsize=`_min_dio_alignment $TEST_DEV`
# fsx usage:
#
diff --git a/tests/generic/240 b/tests/generic/240
index e692318..d3fd442 100755
--- a/tests/generic/240
+++ b/tests/generic/240
@@ -60,7 +60,7 @@ rm -f $seqres.full
rm -f $TEST_DIR/aiodio_sparse
-logical_block_size=`blockdev --getss $TEST_DEV`
+logical_block_size=`_min_dio_alignment $TEST_DEV`
fs_block_size=`stat -f $TEST_DIR | grep "Block size:" | awk '{print $3}'`
if [ $fs_block_size -le $logical_block_size ]; then
diff --git a/tests/generic/263 b/tests/generic/263
index 377b199..094c3d1 100755
--- a/tests/generic/263
+++ b/tests/generic/263
@@ -54,7 +54,7 @@ run_fsx()
}
psize=`$here/src/feature -s`
-bsize=`blockdev --getss $TEST_DEV`
+bsize=`_min_dio_alignment $TEST_DEV`
run_fsx -N 10000 -o 8192 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
run_fsx -N 10000 -o 128000 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] xfststs: add a helper to get the minimum dio size
2013-11-06 10:59 [PATCH] xfststs: add a helper to get the minimum dio size Christoph Hellwig
@ 2013-11-12 17:35 ` Christoph Hellwig
2013-11-12 18:13 ` Eric Sandeen
2013-11-13 3:33 ` Rich Johnston
2 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2013-11-12 17:35 UTC (permalink / raw)
To: xfs
ping?
On Wed, Nov 06, 2013 at 02:59:32AM -0800, Christoph Hellwig wrote:
> Various tests opencode checks to find out the minimum support direct I/O
> size. Replace those with a generic helper that handles network filesystems as
> well. Also remove the Linux 2.4 workaround we had in once place.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> diff --git a/common/rc b/common/rc
> index ea3af12..64139c8 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2179,6 +2179,21 @@ _scale_fsstress_args()
> echo $args
> }
>
> +#
> +# Return the logical block size if running on a block device,
> +# else substitute the page size.
> +#
> +_min_dio_alignment()
> +{
> + dev=$1
> +
> + if [ -b "$dev" ]; then
> + blockdev --getss $dev
> + else
> + $here/src/feature -s
> + fi
> +}
> +
> run_check()
> {
> echo "# $@" >> $seqres.full 2>&1
> diff --git a/tests/generic/091 b/tests/generic/091
> index cee012d..d0f5800 100755
> --- a/tests/generic/091
> +++ b/tests/generic/091
> @@ -54,11 +54,7 @@ run_fsx()
> }
>
> psize=`$here/src/feature -s`
> -bsize=`blockdev --getss $TEST_DEV`
> -kernel=`uname -r | sed -e 's/\(2\..\).*/\1/'`
> -
> -# 2.4 Linux kernels support bsize aligned direct I/O only
> -[ "$HOSTOS" = "Linux" -a "$kernel" = "2.4" ] && bsize=$psize
> +bsize=`_min_dio_alignment $TEST_DEV`
>
> # fsx usage:
> #
> diff --git a/tests/generic/240 b/tests/generic/240
> index e692318..d3fd442 100755
> --- a/tests/generic/240
> +++ b/tests/generic/240
> @@ -60,7 +60,7 @@ rm -f $seqres.full
>
> rm -f $TEST_DIR/aiodio_sparse
>
> -logical_block_size=`blockdev --getss $TEST_DEV`
> +logical_block_size=`_min_dio_alignment $TEST_DEV`
> fs_block_size=`stat -f $TEST_DIR | grep "Block size:" | awk '{print $3}'`
>
> if [ $fs_block_size -le $logical_block_size ]; then
> diff --git a/tests/generic/263 b/tests/generic/263
> index 377b199..094c3d1 100755
> --- a/tests/generic/263
> +++ b/tests/generic/263
> @@ -54,7 +54,7 @@ run_fsx()
> }
>
> psize=`$here/src/feature -s`
> -bsize=`blockdev --getss $TEST_DEV`
> +bsize=`_min_dio_alignment $TEST_DEV`
>
> run_fsx -N 10000 -o 8192 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
> run_fsx -N 10000 -o 128000 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
---end quoted text---
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfststs: add a helper to get the minimum dio size
2013-11-06 10:59 [PATCH] xfststs: add a helper to get the minimum dio size Christoph Hellwig
2013-11-12 17:35 ` Christoph Hellwig
@ 2013-11-12 18:13 ` Eric Sandeen
2013-11-12 18:30 ` Christoph Hellwig
2013-11-13 3:33 ` Rich Johnston
2 siblings, 1 reply; 6+ messages in thread
From: Eric Sandeen @ 2013-11-12 18:13 UTC (permalink / raw)
To: Christoph Hellwig, xfs
On 11/6/13, 4:59 AM, Christoph Hellwig wrote:
> Various tests opencode checks to find out the minimum support direct I/O
> size. Replace those with a generic helper that handles network filesystems as
> well. Also remove the Linux 2.4 workaround we had in once place.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
No callers of min_dio_alignment w/o a blockdev right? But I guess
that fallback is harmless.
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> diff --git a/common/rc b/common/rc
> index ea3af12..64139c8 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2179,6 +2179,21 @@ _scale_fsstress_args()
> echo $args
> }
>
> +#
> +# Return the logical block size if running on a block device,
> +# else substitute the page size.
> +#
> +_min_dio_alignment()
> +{
> + dev=$1
> +
> + if [ -b "$dev" ]; then
> + blockdev --getss $dev
> + else
> + $here/src/feature -s
> + fi
> +}
> +
> run_check()
> {
> echo "# $@" >> $seqres.full 2>&1
> diff --git a/tests/generic/091 b/tests/generic/091
> index cee012d..d0f5800 100755
> --- a/tests/generic/091
> +++ b/tests/generic/091
> @@ -54,11 +54,7 @@ run_fsx()
> }
>
> psize=`$here/src/feature -s`
> -bsize=`blockdev --getss $TEST_DEV`
> -kernel=`uname -r | sed -e 's/\(2\..\).*/\1/'`
> -
> -# 2.4 Linux kernels support bsize aligned direct I/O only
> -[ "$HOSTOS" = "Linux" -a "$kernel" = "2.4" ] && bsize=$psize
> +bsize=`_min_dio_alignment $TEST_DEV`
>
> # fsx usage:
> #
> diff --git a/tests/generic/240 b/tests/generic/240
> index e692318..d3fd442 100755
> --- a/tests/generic/240
> +++ b/tests/generic/240
> @@ -60,7 +60,7 @@ rm -f $seqres.full
>
> rm -f $TEST_DIR/aiodio_sparse
>
> -logical_block_size=`blockdev --getss $TEST_DEV`
> +logical_block_size=`_min_dio_alignment $TEST_DEV`
> fs_block_size=`stat -f $TEST_DIR | grep "Block size:" | awk '{print $3}'`
>
> if [ $fs_block_size -le $logical_block_size ]; then
> diff --git a/tests/generic/263 b/tests/generic/263
> index 377b199..094c3d1 100755
> --- a/tests/generic/263
> +++ b/tests/generic/263
> @@ -54,7 +54,7 @@ run_fsx()
> }
>
> psize=`$here/src/feature -s`
> -bsize=`blockdev --getss $TEST_DEV`
> +bsize=`_min_dio_alignment $TEST_DEV`
>
> run_fsx -N 10000 -o 8192 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
> run_fsx -N 10000 -o 128000 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfststs: add a helper to get the minimum dio size
2013-11-12 18:13 ` Eric Sandeen
@ 2013-11-12 18:30 ` Christoph Hellwig
2013-11-12 18:32 ` Eric Sandeen
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2013-11-12 18:30 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Christoph Hellwig, xfs
On Tue, Nov 12, 2013 at 12:13:16PM -0600, Eric Sandeen wrote:
> On 11/6/13, 4:59 AM, Christoph Hellwig wrote:
> > Various tests opencode checks to find out the minimum support direct I/O
> > size. Replace those with a generic helper that handles network filesystems as
> > well. Also remove the Linux 2.4 workaround we had in once place.
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> No callers of min_dio_alignment w/o a blockdev right? But I guess
> that fallback is harmless.
All network filesystems will not have a device here. Not sure how the
btrfs pool names work, but that would be another suspect.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfststs: add a helper to get the minimum dio size
2013-11-12 18:30 ` Christoph Hellwig
@ 2013-11-12 18:32 ` Eric Sandeen
0 siblings, 0 replies; 6+ messages in thread
From: Eric Sandeen @ 2013-11-12 18:32 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On 11/12/13, 12:30 PM, Christoph Hellwig wrote:
> On Tue, Nov 12, 2013 at 12:13:16PM -0600, Eric Sandeen wrote:
>> On 11/6/13, 4:59 AM, Christoph Hellwig wrote:
>>> Various tests opencode checks to find out the minimum support direct I/O
>>> size. Replace those with a generic helper that handles network filesystems as
>>> well. Also remove the Linux 2.4 workaround we had in once place.
>>>
>>> Signed-off-by: Christoph Hellwig <hch@lst.de>
>>
>> No callers of min_dio_alignment w/o a blockdev right? But I guess
>> that fallback is harmless.
>
> All network filesystems will not have a device here. Not sure how the
> btrfs pool names work, but that would be another suspect.
>
Ah, sure. So when running on NFS the blkdev is unset. Wasn't thinking
about it that way, thanks.
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfststs: add a helper to get the minimum dio size
2013-11-06 10:59 [PATCH] xfststs: add a helper to get the minimum dio size Christoph Hellwig
2013-11-12 17:35 ` Christoph Hellwig
2013-11-12 18:13 ` Eric Sandeen
@ 2013-11-13 3:33 ` Rich Johnston
2 siblings, 0 replies; 6+ messages in thread
From: Rich Johnston @ 2013-11-13 3:33 UTC (permalink / raw)
To: Christoph Hellwig, xfs
This has been committed.
Thanks
--Rich
commit 50e2a514d9db26e37d45d78a8805fb596697b14e
Author: Christoph Hellwig <hch@infradead.org>
Date: Wed Nov 6 10:59:32 2013 +0000
xfstests: add a helper to get the minimum dio size
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-11-13 3:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-06 10:59 [PATCH] xfststs: add a helper to get the minimum dio size Christoph Hellwig
2013-11-12 17:35 ` Christoph Hellwig
2013-11-12 18:13 ` Eric Sandeen
2013-11-12 18:30 ` Christoph Hellwig
2013-11-12 18:32 ` Eric Sandeen
2013-11-13 3:33 ` Rich Johnston
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.