Fix typo in alignment check
authorShu-Yu Fu <shuyufu@gmail.com>
Tue, 21 Oct 2014 13:57:55 +0000 (07:57 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 21 Oct 2014 13:57:55 +0000 (07:57 -0600)
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 <axboe@fb.com>
libfio.c
thread_options.h

index 523cc3695e0d78d643bac2dca7dfe765fc1423b2..9ed802a99228eab56f275933a42d08ee68d33cf6 100644 (file)
--- 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, 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");
 
        if (endian_check()) {
                log_err("fio: endianness settings appear wrong.\n");
index 5c9910a08f2c1aa7b28fcbe625ee36f62228e3ef..ecf4e4729403399f2418241cc10e6bff485641f8 100644 (file)
@@ -477,6 +477,7 @@ struct thread_options_pack {
        uint64_t number_ios;
 
        uint32_t sync_file_range;
        uint64_t number_ios;
 
        uint32_t sync_file_range;
+       uint32_t pad2;
 
        uint64_t latency_target;
        uint64_t latency_window;
 
        uint64_t latency_target;
        uint64_t latency_window;