fio_file->filetype is set in add_file(), but for duplicated files
fio-file->file_name is already set so add_file() is not called.
This patch copies the filetype at the same time as file_name so
it remains valid for dup'd files.
Signed-off-by: Aaron Carroll <aaronc_at_gelato.unsw.edu.au>
--- filesetup.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/filesetup.c b/filesetup.c index 96d1b54..8b04560 100644 --- a/filesetup.c +++ b/filesetup.c @@ -906,8 +906,10 @@ void dup_files(struct thread_data *td, struct thread_data *org) __f = smalloc(sizeof(*__f)); - if (f->file_name) + if (f->file_name) { __f->file_name = smalloc_strdup(f->file_name); + __f->filetype = f->filetype; + } td->files[i] = __f; } -- 1.5.1.6Received on Wed Jun 25 2008 - 09:09:35 CEST
This archive was generated by hypermail 2.2.0 : Wed Jun 25 2008 - 09:30:02 CEST