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 611470cee0aee83a0c9e83962c7660edbbf3a236..c403b176827740f10afbc9dd6391b78c928b681d 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 b240891d1daf86b89bc734b1a71968fe8d25caa8..68a3ab96c25fced92bbc463c2d93e27113a05986 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;