projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure that random_seed is also added to dummy io_buf for dumping
[fio.git]
/
engines
/
mmap.c
diff --git
a/engines/mmap.c
b/engines/mmap.c
index 002918c1fcd4e32323a9038a7b23e310ee06140d..059bfcfae7453d6dd804cf25ab6ad6ecfdc05411 100644
(file)
--- 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 (!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 {
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;
}
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");
}
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");
}
io_u->error = errno;
td_verror(td, io_u->error, "madvise");
}