aio-dio-regress: align I/O buffers to 4k for 4k sector devices
authorJeff Moyer <jmoyer@redhat.com>
Wed, 3 Jun 2009 20:09:34 +0000 (15:09 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 3 Jun 2009 20:09:34 +0000 (15:09 -0500)
(and virtual devices as found on s390)

Without this patch, these tests can randomly fail on s390 systems which
use a virtual block device with sector size of 4k.  Testing confirms
that this patch resolves the issue.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
src/aio-dio-regress/aio-dio-extend-stat.c
src/aio-dio-regress/aio-dio-invalidate-failure.c
src/aio-dio-regress/aio-dio-subblock-eof-read.c

index 4822fea28fa68ca712a9f6e5f1540eb0f28efda4..c274e58204fea951ed7c0b1ae3922c185031382b 100644 (file)
@@ -46,7 +46,7 @@
 
 #define BUFSIZE 1024
 
-static unsigned char buf[BUFSIZE] __attribute((aligned (512)));
+static unsigned char buf[BUFSIZE] __attribute((aligned (4096)));
 
 /* 
  * this was arbitrarily chosen to take about two seconds on a dual athlon in a
index 98c453f3f41f7a0870eaf3e33054757dfa5b8cd3..a1a5df2f7fdebecf809189a6fca3ba97c6c13292 100644 (file)
@@ -54,7 +54,7 @@
 /* This test never survived to 180 seconds on a single spindle */
 #define SECONDS 200
 
-static unsigned char buf[GINORMOUS] __attribute((aligned (512)));
+static unsigned char buf[GINORMOUS] __attribute((aligned (4096)));
 
 #define fail(fmt , args...) do {\
        printf(fmt , ##args);   \
index 960deba2ace552eb6f48c773e96c79363bd8b016..cbcff97c471fbba715728e08a4ba66c536089af2 100644 (file)
@@ -49,7 +49,7 @@ do {                          \
        exit(1);                \
 } while (0)
 
-static unsigned char buffer[4096] __attribute((aligned (512)));
+static unsigned char buffer[4096] __attribute((aligned (4096)));
 
 int
 main(int argc, char **argv)