summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c0a6b0d)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
*/
if (td->io_ops->flags & FIO_MMAPIO)
ret = madvise(f->mmap, f->file_size, MADV_DONTNEED);
*/
if (td->io_ops->flags & FIO_MMAPIO)
ret = madvise(f->mmap, f->file_size, MADV_DONTNEED);
- else if (td->filetype == FIO_TYPE_FILE)
- ret = fadvise(f->fd, f->file_offset, f->file_size, POSIX_FADV_DONTNEED);
- else if (td->filetype == FIO_TYPE_BD)
- ret = blockdev_invalidate_cache(f->fd);
- else if (td->filetype == FIO_TYPE_CHAR)
+ else if (td->filetype == FIO_TYPE_FILE) {
+ if (!td->odirect)
+ ret = fadvise(f->fd, f->file_offset, f->file_size, POSIX_FADV_DONTNEED);
+ } else if (td->filetype == FIO_TYPE_BD) {
+ if (!td->odirect)
+ ret = blockdev_invalidate_cache(f->fd);
+ } else if (td->filetype == FIO_TYPE_CHAR)
}
static int __setup_file_mmap(struct thread_data *td, struct fio_file *f)
}
static int __setup_file_mmap(struct thread_data *td, struct fio_file *f)