From b8c6b4def6391f8be0249c16e5cc4c0adc3a61b8 Mon Sep 17 00:00:00 2001 From: Shu-Yu Fu Date: Tue, 21 Oct 2014 07:57:55 -0600 Subject: [PATCH 1/1] Fix typo in alignment check It checks percentile_list twice and forgets latency_percentile in the thread_options_pack structure. Add alignment after the 32-bit sync_file_range to make it align properly. Signed-off-by: Jens Axboe --- libfio.c | 2 +- thread_options.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libfio.c b/libfio.c index 523cc369..9ed802a9 100644 --- a/libfio.c +++ b/libfio.c @@ -307,7 +307,7 @@ int initialize_fio(char *envp[]) 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"); + compiletime_assert((offsetof(struct thread_options_pack, latency_percentile) % 8) == 0, "latency_percentile"); if (endian_check()) { log_err("fio: endianness settings appear wrong.\n"); diff --git a/thread_options.h b/thread_options.h index 5c9910a0..ecf4e472 100644 --- a/thread_options.h +++ b/thread_options.h @@ -477,6 +477,7 @@ struct thread_options_pack { uint64_t number_ios; uint32_t sync_file_range; + uint32_t pad2; uint64_t latency_target; uint64_t latency_window; -- 2.25.1