public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dwight Engen <dwight.engen@oracle.com>
To: xfs@oss.sgi.com
Subject: [PATCH] xfstests: 091,240,268 fix for xfs on 4k sector hard drive
Date: Wed, 24 Jul 2013 14:32:08 -0400	[thread overview]
Message-ID: <20130724143208.34b77534@oracle.com> (raw)

Tests 091,240, and 268 are failing on my 4k sector hard disk. The dio writes
from fsx and aiodio_sparse2 are failing on xfs with EINVAL which is returned
from the check at the top of xfs_file_dio_aio_write().

The fix is to use blockdev -getpbsz to get the physical sector size instead
of the logical sector size. This makes 091 and 268 work. 240 will not run
on a 4k drive since fs block size == device block size. Tested against
xfs,ext4, and btrfs.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
---
 tests/generic/091 | 2 +-
 tests/generic/240 | 2 +-
 tests/generic/263 | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/generic/091 b/tests/generic/091
index cee012d..8a11505 100755
--- a/tests/generic/091
+++ b/tests/generic/091
@@ -54,7 +54,7 @@ run_fsx()
 }
 
 psize=`$here/src/feature -s`
-bsize=`blockdev --getss $TEST_DEV`
+bsize=`blockdev --getpbsz $TEST_DEV`
 kernel=`uname -r  | sed -e 's/\(2\..\).*/\1/'`
 
 # 2.4 Linux kernels support bsize aligned direct I/O only
diff --git a/tests/generic/240 b/tests/generic/240
index e692318..ac8560d 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=`blockdev --getpbsz $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..9795bc2 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=`blockdev --getpbsz $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
-- 
1.8.1.4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2013-07-24 18:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-24 18:32 Dwight Engen [this message]
2013-07-24 23:57 ` [PATCH] xfstests: 091, 240, 268 fix for xfs on 4k sector hard drive Dave Chinner
2013-07-25  4:36   ` Stan Hoeppner
2013-07-25 14:27     ` Dwight Engen
2013-07-25 15:23       ` Eric Sandeen
2013-07-25 18:43         ` Dwight Engen
2013-07-25 19:07           ` Eric Sandeen
2013-08-15 18:20     ` Ric Wheeler
2013-08-15 23:30       ` Stan Hoeppner
2013-08-19 19:54         ` Stan Hoeppner

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=20130724143208.34b77534@oracle.com \
    --to=dwight.engen@oracle.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