X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=ioengines.c;h=34ae91671a4348c43bacdf9f7eddc2f5e81f020d;hp=b9c6d71400ec672b0288e0abe17f6cff345f9941;hb=3106f220e1710d7e53cb7bd0dbc7dac4584af463;hpb=b284075ab5414220496f396dff038003e57e3047 diff --git a/ioengines.c b/ioengines.c index b9c6d714..34ae9167 100644 --- a/ioengines.c +++ b/ioengines.c @@ -271,6 +271,13 @@ int td_io_open_file(struct thread_data *td, struct fio_file *f) return 1; } + if (f->filetype == FIO_TYPE_PIPE) { + if (td_random(td)) { + log_err("fio: can't seek on pipes (no random io)\n"); + goto err; + } + } + f->last_free_lookup = 0; f->last_completed_pos = 0; f->last_pos = 0; @@ -283,7 +290,9 @@ int td_io_open_file(struct thread_data *td, struct fio_file *f) if (td->o.invalidate_cache && file_invalidate_cache(td, f)) goto err; - if (td->o.fadvise_hint) { + if (td->o.fadvise_hint && + (f->filetype == FIO_TYPE_BD || f->filetype == FIO_TYPE_FILE)) { + int flags; if (td_random(td))