X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=ioengines.c;h=8975591d080acb0efc55894e2f40ec830df9d1fd;hp=1a7a6301d0b6b4d42112e62b8c520813a3c4530b;hb=e116f2b90f110334e77741227ad4e4600302c718;hpb=d5707a3565e958af566247e2c0acf09e031d8921 diff --git a/ioengines.c b/ioengines.c index 1a7a6301..8975591d 100644 --- a/ioengines.c +++ b/ioengines.c @@ -367,6 +367,21 @@ int td_io_open_file(struct thread_data *td, struct fio_file *f) if (f->file_map) memset(f->file_map, 0, f->num_maps * sizeof(int)); +#ifdef FIO_OS_DIRECTIO + /* + * Some OS's have a distinct call to mark the file non-buffered, + * instead of using O_DIRECT (Solaris) + */ + if (td->o.odirect) { + int ret = fio_set_odirect(f->fd); + + if (ret) { + td_verror(td, ret, "fio_set_odirect"); + goto err; + } + } +#endif + done: log_file(td, f, FIO_LOG_OPEN_FILE); return 0;