X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Fmmap.c;h=059bfcfae7453d6dd804cf25ab6ad6ecfdc05411;hp=002918c1fcd4e32323a9038a7b23e310ee06140d;hb=03e20d687566753b90383571e5e152c5142bdffd;hpb=2d7760d1dbbc742a0699b959ffcd8742b9db9e2c diff --git a/engines/mmap.c b/engines/mmap.c index 002918c1..059bfcfa 100644 --- a/engines/mmap.c +++ b/engines/mmap.c @@ -45,12 +45,12 @@ static int fio_mmap_file(struct thread_data *td, struct fio_file *f, } if (!td_random(td)) { - if (madvise(f->mmap_ptr, length, MADV_SEQUENTIAL) < 0) { + if (posix_madvise(f->mmap_ptr, length, POSIX_MADV_SEQUENTIAL) < 0) { td_verror(td, errno, "madvise"); goto err; } } else { - if (madvise(f->mmap_ptr, length, MADV_RANDOM) < 0) { + if (posix_madvise(f->mmap_ptr, length, POSIX_MADV_RANDOM) < 0) { td_verror(td, errno, "madvise"); goto err; } @@ -170,7 +170,7 @@ static int fio_mmapio_queue(struct thread_data *td, struct io_u *io_u) io_u->error = errno; td_verror(td, io_u->error, "msync"); } - if (madvise(io_u->mmap_data, io_u->xfer_buflen, MADV_DONTNEED) < 0) { + if (posix_madvise(io_u->mmap_data, io_u->xfer_buflen, POSIX_MADV_DONTNEED) < 0) { io_u->error = errno; td_verror(td, io_u->error, "madvise"); }