Skip to content

Commit

Permalink
Merge pull request #228 from breuner/fix-mdtest-directio
Browse files Browse the repository at this point in the history
mdtest: use correct number of bytes for posix_memalign of read buffer
  • Loading branch information
glennklockwood committed Jun 2, 2020
2 parents 9f07265 + c828a0f commit d4d3c72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mdtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit d4d3c72

Please sign in to comment.