Define struct file_name as a file local structure
authorTomohiro Kusumi <tkusumi@tuxera.com>
Tue, 7 Mar 2017 20:13:06 +0000 (22:13 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 10 Mar 2017 21:43:37 +0000 (14:43 -0700)
This is just an one-off structure for filesetup.c to walk through
all the files (among all jobs), so it can be file local.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
file.h
filesetup.c

diff --git a/file.h b/file.h
index 611470c..c403b17 100644 (file)
--- a/file.h
+++ b/file.h
@@ -151,11 +151,6 @@ struct fio_file {
 #define FILE_SET_ENG_DATA(f, data)     \
        ((f)->engine_data = (uintptr_t) (data))
 
-struct file_name {
-       struct flist_head list;
-       char *filename;
-};
-
 #define FILE_FLAG_FNS(name)                                            \
 static inline void fio_file_set_##name(struct fio_file *f)             \
 {                                                                      \
index b240891..68a3ab9 100644 (file)
@@ -24,6 +24,14 @@ static int root_warn;
 
 static FLIST_HEAD(filename_list);
 
+/*
+ * List entry for filename_list
+ */
+struct file_name {
+       struct flist_head list;
+       char *filename;
+};
+
 static inline void clear_error(struct thread_data *td)
 {
        td->error = 0;