steadystate: fix alignment in stat.h
authorVincent Fu <Vincent.Fu@sandisk.com>
Tue, 6 Dec 2016 18:11:09 +0000 (13:11 -0500)
committerVincent Fu <Vincent.Fu@sandisk.com>
Wed, 7 Dec 2016 21:03:39 +0000 (16:03 -0500)
This was not problematic in my Linux and OSX testing, but Windows clients did not successfully receive thread_stat without this padding.

stat.h

diff --git a/stat.h b/stat.h
index 0a7bab1..b145b5e 100644 (file)
--- a/stat.h
+++ b/stat.h
@@ -198,10 +198,10 @@ struct thread_stat {
         */
        union {
                uint16_t continue_on_error;
-               uint64_t pad2;
+               uint32_t pad2;
        };
-       uint64_t total_err_count;
        uint32_t first_error;
+       uint64_t total_err_count;
 
        uint64_t nr_block_infos;
        uint32_t block_infos[MAX_NR_BLOCK_INFOS];
@@ -210,6 +210,7 @@ struct thread_stat {
        uint32_t unit_base;
 
        uint32_t latency_depth;
+       uint32_t pad3;
        uint64_t latency_target;
        fio_fp64_t latency_percentile;
        uint64_t latency_window;
@@ -225,12 +226,12 @@ struct thread_stat {
 
        union {
                uint64_t *ss_iops_data;
-               uint64_t pad3;
+               uint64_t pad4;
        };
 
        union {
                uint64_t *ss_bw_data;
-               uint64_t pad4;
+               uint64_t pad5;
        };
 } __attribute__((packed));