xfstests: add a helper to get the minimum dio size

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>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
Christoph Hellwig
2013-11-06 10:59:32 +00:00
committed by Rich Johnston
parent 6bd85c0a99
commit 50e2a514d9
4 changed files with 18 additions and 7 deletions
+15
View File
@@ -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