unsigned int bs;
char *b;
+ if (td->io_ops->flags & FIO_PIPEIO)
+ return 0;
+
if (!fio_file_open(f)) {
if (td->io_ops->open_file(td, f)) {
log_err("fio: cannot pre-read, failed to open file\n");
char buf[FIO_VERROR_SIZE];
int __e = errno;
- if (errno == EPERM && (flags & FIO_O_NOATIME)) {
+ if (__e == EPERM && (flags & FIO_O_NOATIME)) {
flags &= ~FIO_O_NOATIME;
goto open_again;
}
struct fio_file *f;
unsigned int i;
- for_each_file(td, f, i)
- td_io_close_file(td, f);
+ for_each_file(td, f, i) {
+ if (fio_file_open(f))
+ td_io_close_file(td, f);
+ }
}
void close_and_free_files(struct thread_data *td)