All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/252: fix aiocp buffer alignment
@ 2017-11-09  8:09 Zorro Lang
  2017-11-10  4:54 ` Eryu Guan
  0 siblings, 1 reply; 3+ messages in thread
From: Zorro Lang @ 2017-11-09  8:09 UTC (permalink / raw)
  To: fstests

g/252 fails on 4k hard sector size disk, due to aiocp.c use 512
bytes alignment by default. So use the '-a' option of aiocp, to
specify a proper alignment size.

Signed-off-by: Zorro Lang <zlang@redhat.com>
---

Test this patch with below sector size:
TEST_DEV       SCRATCH_DEV
4k             4k
4k             512
512            4k
512            512

All passed.

Thanks,
Zorro

 tests/generic/252 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/generic/252 b/tests/generic/252
index ffedd569..418465b0 100755
--- a/tests/generic/252
+++ b/tests/generic/252
@@ -69,6 +69,7 @@ nr=640
 bufnr=128
 filesize=$((blksz * nr))
 bufsize=$((blksz * bufnr))
+alignment=`_min_dio_alignment $TEST_DEV`
 
 _require_fs_space $SCRATCH_MNT $((filesize / 1024 * 5 / 4))
 
@@ -85,7 +86,7 @@ $XFS_IO_PROG -f -c "pwrite -S 0x63 $bufsize 1" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $TEST_DIR/moo >> $seqres.full
 sync
 _dmerror_load_error_table
-$AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
+$AIO_TEST -a $alignment -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
 _dmerror_load_working_table
 _dmerror_unmount
 _dmerror_mount
-- 
2.13.6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] generic/252: fix aiocp buffer alignment
  2017-11-09  8:09 [PATCH] generic/252: fix aiocp buffer alignment Zorro Lang
@ 2017-11-10  4:54 ` Eryu Guan
  2017-11-10  6:50   ` Zorro Lang
  0 siblings, 1 reply; 3+ messages in thread
From: Eryu Guan @ 2017-11-10  4:54 UTC (permalink / raw)
  To: Zorro Lang; +Cc: fstests

On Thu, Nov 09, 2017 at 04:09:01PM +0800, Zorro Lang wrote:
> g/252 fails on 4k hard sector size disk, due to aiocp.c use 512
> bytes alignment by default. So use the '-a' option of aiocp, to
> specify a proper alignment size.
> 
> Signed-off-by: Zorro Lang <zlang@redhat.com>

There're other tests that calls aiocp with direct I/O, I think they can
be fixed too in one patch.

$ grep -H DIRECT `grep aiocp tests/* -rI | cut -d: -f1 | sort | uniq`
tests/generic/252:$AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
tests/generic/329:$AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
tests/generic/330:$AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
tests/xfs/237:$AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
tests/xfs/239:$AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full

Thanks,
Eryu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] generic/252: fix aiocp buffer alignment
  2017-11-10  4:54 ` Eryu Guan
@ 2017-11-10  6:50   ` Zorro Lang
  0 siblings, 0 replies; 3+ messages in thread
From: Zorro Lang @ 2017-11-10  6:50 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

On Fri, Nov 10, 2017 at 12:54:44PM +0800, Eryu Guan wrote:
> On Thu, Nov 09, 2017 at 04:09:01PM +0800, Zorro Lang wrote:
> > g/252 fails on 4k hard sector size disk, due to aiocp.c use 512
> > bytes alignment by default. So use the '-a' option of aiocp, to
> > specify a proper alignment size.
> > 
> > Signed-off-by: Zorro Lang <zlang@redhat.com>
> 
> There're other tests that calls aiocp with direct I/O, I think they can
> be fixed too in one patch.
> 
> $ grep -H DIRECT `grep aiocp tests/* -rI | cut -d: -f1 | sort | uniq`
> tests/generic/252:$AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
> tests/generic/329:$AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
> tests/generic/330:$AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
> tests/xfs/237:$AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
> tests/xfs/239:$AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full

OK, I'm going to look into them, to see if there's a better way to fix them all.

> 
> Thanks,
> Eryu
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-10  6:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09  8:09 [PATCH] generic/252: fix aiocp buffer alignment Zorro Lang
2017-11-10  4:54 ` Eryu Guan
2017-11-10  6:50   ` Zorro Lang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.