aio-dio-regress: align I/O buffers to 4k for 4k sector devices

(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>
This commit is contained in:
Jeff Moyer
2009-06-03 15:09:34 -05:00
committed by Eric Sandeen
parent c639e76bdb
commit 4683b6d261
3 changed files with 3 additions and 3 deletions
+1 -1
View 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
@@ -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); \
@@ -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)