Move variables to backend, fix up line spaces
authorJens Axboe <axboe@kernel.dk>
Thu, 9 Feb 2012 10:25:24 +0000 (11:25 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 9 Feb 2012 10:25:24 +0000 (11:25 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
backend.c
fio.c
libfio.c

index 821e978a98b0152b2e4c099c5af6eb6d8e0b1abc..efb17b3bae550baeae02a5bb030ab0526171f7f1 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -58,6 +58,14 @@ static volatile int fio_abort;
 
 struct io_log *agg_io_log[2];
 
+int groupid = 0;
+unsigned int thread_number = 0;
+unsigned int nr_process = 0;
+unsigned int nr_thread = 0;
+int shm_id = 0;
+int temp_stall_ts;
+unsigned long done_secs = 0;
+
 #define PAGE_ALIGN(buf)        \
        (char *) (((unsigned long) (buf) + page_mask) & ~page_mask)
 
@@ -285,6 +293,7 @@ requeue:
 
        return 0;
 }
+
 static inline void __update_tv_cache(struct thread_data *td)
 {
        fio_gettime(&td->tv_cache, NULL);
@@ -354,8 +363,6 @@ static int break_on_this_error(struct thread_data *td, enum fio_ddir ddir,
        return 0;
 }
 
-
-
 /*
  * The main verify engine. Runs over the writes we previously submitted,
  * reads the blocks back in, and checks the crc/md5 of the data.
@@ -1302,8 +1309,6 @@ reaped:
                fio_terminate_threads(TERMINATE_ALL);
 }
 
-
-
 /*
  * Main function for kicking off and reaping jobs, as needed.
  */
@@ -1579,7 +1584,6 @@ static int create_disk_util_thread(void)
        return 0;
 }
 
-
 int fio_backend(void)
 {
        struct thread_data *td;
@@ -1634,5 +1638,3 @@ int fio_backend(void)
        fio_mutex_remove(writeout_mutex);
        return exit_value;
 }
-
-
diff --git a/fio.c b/fio.c
index f0a8ee2636d015116055d69148a0f524dfc50f40..5a99318ed4b4e89fa355b4a80b40082c631dd2ca 100644 (file)
--- a/fio.c
+++ b/fio.c
 unsigned long page_mask;
 unsigned long page_size;
 
-int groupid = 0;
-unsigned int thread_number = 0;
-unsigned int nr_process = 0;
-unsigned int nr_thread = 0;
-int shm_id = 0;
-int temp_stall_ts;
-unsigned long done_secs = 0;
-
-/*
- * Just expose an empty list, if the OS does not support disk util stats
- */
-#ifndef FIO_HAVE_DISK_UTIL
-FLIST_HEAD(disk_list);
-#endif
-
-unsigned long arch_flags = 0;
-
 static int endian_check(void)
 {
        union {
index cb917cef99af8c4be0e301992f2f97bc2e291000..76a36a616d55b473891085e3c2908b2ff0262931 100644 (file)
--- a/libfio.c
+++ b/libfio.c
 #include <string.h>
 #include "fio.h"
 
+/*
+ * Just expose an empty list, if the OS does not support disk util stats
+ */
+#ifndef FIO_HAVE_DISK_UTIL
+FLIST_HEAD(disk_list);
+#endif
+
+unsigned long arch_flags = 0;
+
 static const char *fio_os_strings[os_nr] = {
        "Invalid",
        "Linux",