Add alignment to thread_options_pack for proper fp alignment
authorJens Axboe <axboe@fb.com>
Mon, 20 Oct 2014 16:56:46 +0000 (10:56 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 20 Oct 2014 16:56:46 +0000 (10:56 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
libfio.c
server.h
thread_options.h

index 7eff63b4cbdaa6c3372b1479ad3f64d3d982d210..523cc3695e0d78d643bac2dca7dfe765fc1423b2 100644 (file)
--- a/libfio.c
+++ b/libfio.c
@@ -302,8 +302,12 @@ int initialize_fio(char *envp[])
         * can run into problems on archs that fault on unaligned fp
         * access (ARM).
         */
-       compiletime_assert((offsetof(struct thread_stat, percentile_list) % 8) == 0, "fp align");
-       compiletime_assert((offsetof(struct thread_stat, latency_percentile) % 8) == 0, "fp align");
+       compiletime_assert((offsetof(struct thread_stat, percentile_list) % 8) == 0, "stat percentile_list");
+       compiletime_assert((offsetof(struct thread_stat, latency_percentile) % 8) == 0, "stat latency_percentile");
+       compiletime_assert((offsetof(struct thread_options_pack, zipf_theta) % 8) == 0, "zipf_theta");
+       compiletime_assert((offsetof(struct thread_options_pack, pareto_h) % 8) == 0, "pareto_h");
+       compiletime_assert((offsetof(struct thread_options_pack, percentile_list) % 8) == 0, "percentile_list");
+       compiletime_assert((offsetof(struct thread_options_pack, percentile_list) % 8) == 0, "latency_percentile");
 
        if (endian_check()) {
                log_err("fio: endianness settings appear wrong.\n");
index 67ba38d216d92464ef6b70614b011d04697730dc..46d05a699755ed2883dfa067263033761efd7231 100644 (file)
--- a/server.h
+++ b/server.h
@@ -38,7 +38,7 @@ struct fio_net_cmd_reply {
 };
 
 enum {
-       FIO_SERVER_VER                  = 37,
+       FIO_SERVER_VER                  = 38,
 
        FIO_SERVER_MAX_FRAGMENT_PDU     = 1024,
        FIO_SERVER_MAX_CMD_MB           = 2048,
index a45d7b79b7ef9b81b06832d0e2e6b537f9118356..5c9910a08f2c1aa7b28fcbe625ee36f62228e3ef 100644 (file)
@@ -349,6 +349,7 @@ struct thread_options_pack {
        uint32_t bs_is_seq_rand;
 
        uint32_t random_distribution;
+       uint32_t pad;
        fio_fp64_t zipf_theta;
        fio_fp64_t pareto_h;