X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;ds=sidebyside;f=filesetup.c;h=1a5a7eccb1b8c95c545c7b94923990d6a005e23c;hb=8b5f73134cfaab8e3f72bea4166e57c59c635b69;hp=17bdd2639f6ce3cc75e192063c1c5276ba6076e0;hpb=835d9b9ed0e5c2591b8a3eacbd5f4ab6bdab466c;p=fio.git diff --git a/filesetup.c b/filesetup.c index 17bdd263..1a5a7ecc 100644 --- a/filesetup.c +++ b/filesetup.c @@ -156,6 +156,9 @@ static int pre_read_file(struct thread_data *td, struct fio_file *f) 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"); @@ -710,8 +713,10 @@ void close_files(struct thread_data *td) 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)