From 24ffb6f85058a95d4647541283c94c9e27520f1b Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 20 Oct 2014 10:56:46 -0600 Subject: [PATCH] Add alignment to thread_options_pack for proper fp alignment Signed-off-by: Jens Axboe --- libfio.c | 8 ++++++-- server.h | 2 +- thread_options.h | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libfio.c b/libfio.c index 7eff63b4..523cc369 100644 --- 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"); diff --git a/server.h b/server.h index 67ba38d2..46d05a69 100644 --- 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, diff --git a/thread_options.h b/thread_options.h index a45d7b79..5c9910a0 100644 --- a/thread_options.h +++ b/thread_options.h @@ -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; -- 2.25.1