fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] generic/095: align DIO read/writes with the supported sector size for the device
@ 2021-10-11 15:11 Luís Henriques
  0 siblings, 0 replies; only message in thread
From: Luís Henriques @ 2021-10-11 15:11 UTC (permalink / raw)
  To: fstests
  Cc: Ming Lei, Zorro Lang, Theodore Ts'o, Jens Axboe, Luís Henriques

This test creates fio DIO jobs with bs=1k, which will fail when using block
devices that have logical sector size bigger than 1k (such as zram, advanced
format HDD's with 4k sectors, DASD's on mainframes with 2k sectors, etc).

Fix the test by using _min_dio_alignment instead to get the correct size.

Signed-off-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
---
Changes since v1:
- Updated commit subject and description as suggested by Ted (thanks for
  the review!)

 tests/generic/095 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/generic/095 b/tests/generic/095
index c4693917b3e1..80448200bb86 100755
--- a/tests/generic/095
+++ b/tests/generic/095
@@ -23,6 +23,7 @@ iodepth_batch=$((8 * LOAD_FACTOR))
 numjobs=$((5 * LOAD_FACTOR))
 fio_config=$tmp.fio
 fio_out=$tmp.fio.out
+blksz=$(_min_dio_alignment $SCRATCH_DEV)
 cat >$fio_config <<EOF
 [global]
 bs=8k
@@ -34,7 +35,7 @@ directory=$SCRATCH_MNT
 numjobs=$numjobs
 [job1]
 ioengine=sync
-bs=1k
+bs=$blksz
 direct=1
 rw=randread
 filename=file1:file2
@@ -44,7 +45,7 @@ rw=randwrite
 direct=1
 filename=file1:file2
 [job3]
-bs=1k
+bs=$blksz
 ioengine=posixaio
 rw=randwrite
 direct=1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-11 15:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 15:11 [PATCH v2] generic/095: align DIO read/writes with the supported sector size for the device Luís Henriques

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).