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 0a7bab18c0e0c9d55400d77c1ad375a978704b97..b145b5ee850ad19c7c1805fd7bd5211411991cf4 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));