IO buffer allocation cleanup
[fio.git] / filesetup.c
index f0c42e896de1afc336888f949045b8b493087c61..faeefaf308fa3e32107375fed6ac68faf65fe594 100644 (file)
@@ -209,6 +209,12 @@ int generic_open_file(struct thread_data *td, struct fio_file *f)
                        return 1;
                }
                is_std = 1;
+
+               /*
+                * move output logging to stderr, if we are writing to stdout
+                */
+               if (td_write(td))
+                       f_out = stderr;
        }
 
        if (td->o.odirect)
@@ -216,7 +222,7 @@ int generic_open_file(struct thread_data *td, struct fio_file *f)
        if (td->o.sync_io)
                flags |= O_SYNC;
 
-       if (td_write(td) || td_rw(td)) {
+       if (td_write(td)) {
                flags |= O_RDWR;
 
                if (f->filetype == FIO_TYPE_FILE)