From bc3456fa06cc7777c4764da8c7b1c0fd0a3c3772 Mon Sep 17 00:00:00 2001 From: Aaron Carroll Date: Wed, 25 Jun 2008 09:20:37 +0200 Subject: [PATCH 1/1] Prevent filetype disappearing 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 Signed-off-by: Jens Axboe --- filesetup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/filesetup.c b/filesetup.c index 96d1b54f..8b045609 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; } -- 2.25.1