#include <assert.h>
#include "fio.h"
-#include "os.h"
static LIST_HEAD(engine_list);
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;
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))
get_file(f);
return 0;
err:
- td->io_ops->close_file(td, f);
+ if (td->io_ops->close_file)
+ td->io_ops->close_file(td, f);
return 1;
}
put_file(td, f);
}
-