From: David Chinner <dgc@sgi.com>
To: xfs-dev <xfs-dev@sgi.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: [Patch] xfsqa: 091 needs to support sector size != 512 bytes
Date: Wed, 2 Apr 2008 15:34:51 +1000 [thread overview]
Message-ID: <20080402053451.GE103491721@sgi.com> (raw)
Test 091 assumes a direct I/O alignment of 512 bytes,
a hold over from 2.4 kernels. On 2.6. kernels, direct
I/O needs to be aligned to the sector size the filesystem
was mkfs'd with.
Teach 091 about 2.6 kernels and grab the sector size from the
xfs_info output.
Signed-off-by: Dave Chinner <dgc@sgi.com>
---
xfstests/091 | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
Index: xfs-cmds/xfstests/091
===================================================================
--- xfs-cmds.orig/xfstests/091 2007-03-19 08:49:37.000000000 +1100
+++ xfs-cmds/xfstests/091 2008-04-02 15:27:39.266824430 +1000
@@ -43,10 +43,20 @@ run_fsx()
psize=`$here/src/feature -s`
bsize=512
-# 2.4 Linux kernels support bsize aligned direct I/O only
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
+# 2.6 Linux kernels support sector aligned direct I/O only
+if [ "$HOSTOS" = "Linux" -a "$kernel" = "2.6" ]; then
+ xfs_info $TEST_DIR | _filter_mkfs 2> $tmp.info
+ if [ $? -eq 0 ]; then
+ source $tmp.info
+ bsize=$sectsz
+ fi
+fi
+
# fsx usage:
#
# -N numops: total # operations to do
next reply other threads:[~2008-04-02 5:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-02 5:34 David Chinner [this message]
2008-04-02 6:58 ` [Patch] xfsqa: 091 needs to support sector size != 512 bytes Barry Naujok
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080402053451.GE103491721@sgi.com \
--to=dgc@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox