On Mon, Oct 11, 2021 at 05:31:44PM +0800, Ming Lei wrote: > On Mon, Oct 11, 2021 at 10:09:30AM +0100, Luís Henriques wrote: > > On Sun, Oct 10, 2021 at 04:31:25PM +0800, Zorro Lang wrote: > > > On Fri, Oct 01, 2021 at 06:11:49PM +0100, Luis Henriques wrote: > > > > Hi! > > > > > > > > I'm seeing generic/095 failing both with ext4 and xfs (but not on btrfs). > > > > Here's what I'm getting: > > > > > > > > # cat results/generic/095.out.bad > > > > QA output created by 095 > > > > fio: io_u error on file /tmp/mnt/scratch/file1: Invalid argument: read offset=51200, buflen=1024 > > > > fio: io_u error on file /tmp/mnt/scratch/file1: Invalid argument: read offset=133120, buflen=1024 > > > > fio: io_u error on file /tmp/mnt/scratch/file2: Invalid argument: write offset=92160, buflen=1024 > > > > fio: io_u error on file /tmp/mnt/scratch/file2: Invalid argument: write offset=158720, buflen=1024 > > > > fio: io_u error on file /tmp/mnt/scratch/file2: Invalid argument: write offset=513024, buflen=1024 > > > > fio: io_u error on file /tmp/mnt/scratch/file2: Invalid argument: write offset=33792, buflen=1024 > > > > fio: io_u error on file /tmp/mnt/scratch/file2: Invalid argument: write offset=449536, buflen=1024 > > > > fio: io_u error on file /tmp/mnt/scratch/file1: Invalid argument: read offset=45056, buflen=1024 > > > > fio: io_u error on file /tmp/mnt/scratch/file1: Invalid argument: read offset=30720, buflen=1024 > > > > fio: io_u error on file /tmp/mnt/scratch/file1: Invalid argument: write offset=222208, buflen=1024 > > > > fio: io_u error on file /tmp/mnt/scratch/file1: Invalid argument: read offset=342016, buflen=1024 > > > > fio: io_u error on file /tmp/mnt/scratch/file1: Invalid argument: write offset=177152, buflen=1024 > > > > fio: pid=4090, got signal=11 > > > > fio: io_u error on file /tmp/mnt/scratch/file1: Invalid argument: write offset=43008, buflen=1024 > > > > fio: io_u error on file /tmp/mnt/scratch/file1: Invalid argument: write offset=308224, buflen=1024 > > > > fio: pid=4086, got signal=11 > > The issue should be from generic/095 test itself, which run dio with bs=1k, > but logical block size is 4k. I guess the test may work after you change > bs to 4k in generic/095. Ah, I see what you mean. Ok, I've used the patch bellow and the test now passes. The patch changes the block size only for the DIO jobs, there are other jobs where bs=1k is still used. Do you think other jobs should be changed as well? Cheers, -- Luís >From 7e304a3dc11b7761700aff853078ef7171dd5d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Henriques?= <lhenriques@xxxxxxx> Date: Mon, 11 Oct 2021 11:08:47 +0100 Subject: [PATCH] generic/095: use device blocksize instead of 1k for DIO operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This test fails for ext4 and xfs when using zram. As pointed out by others (Zorro and Ming), the test shouldn't use 1k for dio. Signed-off-by: Luís Henriques <lhenriques@xxxxxxx> --- tests/generic/095 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/generic/095 b/tests/generic/095 index c4693917b3e1..47d18e1a6f63 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=$(_get_block_size $SCRATCH_MNT) 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