From: Jens Axboe Date: Mon, 20 Oct 2014 16:52:31 +0000 (-0600) Subject: fio: add alignment check for fp fields X-Git-Tag: fio-2.1.14~47 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=976a77566d8b735fd0c064f33332aa4e0204122c fio: add alignment check for fp fields Signed-off-by: Jens Axboe --- diff --git a/libfio.c b/libfio.c index 5a996f9c..7eff63b4 100644 --- a/libfio.c +++ b/libfio.c @@ -297,6 +297,14 @@ 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, "fp align"); + compiletime_assert((offsetof(struct thread_stat, latency_percentile) % 8) == 0, "fp align"); + if (endian_check()) { log_err("fio: endianness settings appear wrong.\n"); log_err("fio: please report this to fio@vger.kernel.org\n");