From c828a0f32c50c8644832b6fab21974880860e415 Mon Sep 17 00:00:00 2001 From: Sven Breuner Date: Wed, 3 Jun 2020 01:22:44 +0300 Subject: [PATCH] mdtest: use correct number of bytes for posix_memalign of read buffer Fixes a typo in initial posix_memalign commit for DirectIO support. --- src/mdtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mdtest.c b/src/mdtest.c index c8a8b47..105837f 100644 --- a/src/mdtest.c +++ b/src/mdtest.c @@ -633,7 +633,7 @@ void mdtest_read(int random, int dirs, const long dir_iter, char *path) { /* allocate read buffer */ if (read_bytes > 0) { - int alloc_res = posix_memalign((void**)&read_buffer, sysconf(_SC_PAGESIZE), write_bytes); + int alloc_res = posix_memalign((void**)&read_buffer, sysconf(_SC_PAGESIZE), read_bytes); if (alloc_res) { FAIL("out of memory"); }