projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mmap engine: fix open-for-size check
[fio.git]
/
filesetup.c
diff --git
a/filesetup.c
b/filesetup.c
index f0c42e896de1afc336888f949045b8b493087c61..d79fc61081278c934fd1c4aecbfe344666c75811 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-209,6
+209,12
@@
int generic_open_file(struct thread_data *td, struct fio_file *f)
return 1;
}
is_std = 1;
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)
}
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->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)
flags |= O_RDWR;
if (f->filetype == FIO_TYPE_FILE)
@@
-468,8
+474,7
@@
void close_files(struct thread_data *td)
unsigned int i;
for_each_file(td, f, i) {
unsigned int i;
for_each_file(td, f, i) {
- if ((f->flags & FIO_FILE_UNLINK) &&
- f->filetype == FIO_TYPE_FILE)
+ if (td->o.unlink && f->filetype == FIO_TYPE_FILE)
unlink(f->file_name);
td_io_close_file(td, f);
unlink(f->file_name);
td_io_close_file(td, f);