From 74055e9afecdab30ba0588e9c71564106275b00e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lu=C3=ADs=20Henriques?= Date: Mon, 11 Oct 2021 16:11:16 +0100 Subject: [PATCH] generic/095: align DIO read/writes with the supported sector size for the device MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Theodore Ts'o Signed-off-by: Eryu Guan --- tests/generic/095 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/generic/095 b/tests/generic/095 index c4693917..80448200 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 <