X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=libfio.c;h=9ed802a99228eab56f275933a42d08ee68d33cf6;hp=5a996f9cbd6e9f35d09709ad70ff78d3a3365c69;hb=cd5902f976e1f86e360c0c46a0a5793560f9c9c8;hpb=ebea21332ee7d7d12f17cbe9718611bcec558210 diff --git a/libfio.c b/libfio.c index 5a996f9c..9ed802a9 100644 --- a/libfio.c +++ b/libfio.c @@ -297,6 +297,18 @@ int initialize_fio(char *envp[]) { long ps; + /* + * We need these to be properly 64-bit aligned, otherwise we + * can run into problems on archs that fault on unaligned fp + * access (ARM). + */ + 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, latency_percentile) % 8) == 0, "latency_percentile"); + if (endian_check()) { log_err("fio: endianness settings appear wrong.\n"); log_err("fio: please report this to fio@vger.kernel.org\n");