mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user